CCM NG: Fixed bug
git-svn-id: https://svn.libreccm.org/ccm/ccm_ng@5150 8810af33-2d31-482b-a856-94f89814c4dfpull/2/head
parent
eafa41babb
commit
b38023fa2a
|
|
@ -713,8 +713,7 @@ public class CategoryManagerTest {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tries to retrieve the index object from several categories and verifies
|
* Tries to retrieve the index object from several categories and verifies
|
||||||
* that the expected object is returned by
|
* that the expected object is returned by null {@link CategoryManager#getIndexObject(org.libreccm.categorization.Category).
|
||||||
* {@link CategoryManager#getIndexObject(org.libreccm.categorization.Category).
|
|
||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
@UsingDataSet(
|
@UsingDataSet(
|
||||||
|
|
@ -724,11 +723,17 @@ public class CategoryManagerTest {
|
||||||
final Optional<Category> category1 = categoryRepo.findById(-2100L);
|
final Optional<Category> category1 = categoryRepo.findById(-2100L);
|
||||||
final Optional<Category> category2 = categoryRepo.findById(-2200L);
|
final Optional<Category> category2 = categoryRepo.findById(-2200L);
|
||||||
|
|
||||||
assertThat(categoryManager.getIndexObject(category1.get()).isPresent(),
|
assertThat(categoryManager
|
||||||
|
.getIndexObject(category1.get())
|
||||||
|
.stream()
|
||||||
|
.findFirst()
|
||||||
|
.isPresent(),
|
||||||
is(false));
|
is(false));
|
||||||
|
|
||||||
final Optional<CcmObject> index2 = categoryManager.getIndexObject(
|
final Optional<CcmObject> index2 = categoryManager.getIndexObject(
|
||||||
category2.get());
|
category2.get())
|
||||||
|
.stream()
|
||||||
|
.findFirst();
|
||||||
assertThat(index2.isPresent(), is(true));
|
assertThat(index2.isPresent(), is(true));
|
||||||
assertThat(index2.get().getDisplayName(), is(equalTo("object3")));
|
assertThat(index2.get().getDisplayName(), is(equalTo("object3")));
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue