use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.
the class FacetDescriptionFactoryTest method createMultiValueFacetDescriptionCreatesAMultiValueFacetDescription.
@Test
public void createMultiValueFacetDescriptionCreatesAMultiValueFacetDescription() {
FacetDescription description = instance.createMultiValueListFacetDescription("facetName", "propertyName");
assertThat(description, is(instanceOf(MultiValueListFacetDescription.class)));
}
use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.
the class FacetDescriptionFactoryTest method createListFacetDescriptionCreatesAListFacetDescription.
@Test
public void createListFacetDescriptionCreatesAListFacetDescription() {
PropertyParser parser = mock(PropertyParser.class);
FacetDescription description = instance.createListFacetDescription("facetName", parser, "propertyName");
assertThat(description, is(instanceOf(ListFacetDescription.class)));
}
use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.
the class FacetDescriptionFactoryTest method createListFacetLetsThePropertyParserFactoryCreateAParser.
@Test
public void createListFacetLetsThePropertyParserFactoryCreateAParser() {
FacetDescription description = instance.createListFacetDescription("facetName", String.class, "propertyName");
assertThat(description, is(notNullValue()));
verify(parserFactory).getParser(String.class);
}
use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.
the class FacetDescriptionFactoryTest method createListFacetDescriptionWithMultipleRelationsCreatesADerivedListFacetDescription.
@Test
public void createListFacetDescriptionWithMultipleRelationsCreatesADerivedListFacetDescription() {
PropertyParser parser = mock(PropertyParser.class);
FacetDescription description = instance.createListFacetDescription("facetName", parser, "propertyName", "relation", "relation2");
assertThat(description, is(instanceOf(RelatedListFacetDescription.class)));
}
use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.
the class FacetDescriptionFactoryTest method createDerivedKeywordDescriptionCreatesADerivedListFacetDescription.
@Test
public void createDerivedKeywordDescriptionCreatesADerivedListFacetDescription() {
FacetDescription description = instance.createDerivedKeywordDescription("facetName", "relationName", "ww", "relations");
assertThat(description, is(instanceOf(DerivedListFacetDescription.class)));
verify(parserFactory).getParser(String.class);
}
Aggregations