Example usage for com.liferay.portal.spring.hibernate LastSessionRecorderUtil syncLastSessionState

List of usage examples for com.liferay.portal.spring.hibernate LastSessionRecorderUtil syncLastSessionState

Introduction

In this page you can find the example usage for com.liferay.portal.spring.hibernate LastSessionRecorderUtil syncLastSessionState.

Prototype

public static void syncLastSessionState() 

Source Link

Usage

From source file:com.liferay.document.library.service.test.DLFileEntryFinderTest.java

License:Open Source License

@Ignore
@Test/*from  w w w.  j a  va  2s .c o  m*/
public void testFindByNoAssets() throws Exception {
    AssetEntryLocalServiceUtil.deleteEntry(DLFileEntry.class.getName(),
            _defaultRepositoryDLFileVersion.getFileEntryId());

    LastSessionRecorderUtil.syncLastSessionState();

    List<DLFileEntry> dlFileEntries = DLFileEntryLocalServiceUtil.getNoAssetFileEntries();

    Assert.assertEquals(dlFileEntries.toString(), 1, dlFileEntries.size());

    DLFileEntry dlFileEntry = dlFileEntries.get(0);

    Assert.assertEquals("FE1.txt", dlFileEntry.getTitle());
}

From source file:com.liferay.journal.service.persistence.test.JournalFolderFinderTest.java

License:Open Source License

@Test
public void testFindF_ByNoAssets() throws Exception {
    AssetEntryLocalServiceUtil.deleteEntry(JournalFolder.class.getName(), _folder2.getFolderId());

    LastSessionRecorderUtil.syncLastSessionState();

    List<JournalFolder> folders = _journalFolderFinder.findF_ByNoAssets();

    Assert.assertEquals(folders.toString(), 1, folders.size());

    JournalFolder folder = folders.get(0);

    Assert.assertEquals(_folder2.getFolderId(), folder.getFolderId());
}