Search in sources :

Example 11 with FacetDescription

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)));
}
Also used : FacetDescription(nl.knaw.huygens.timbuctoo.search.description.FacetDescription) Test(org.junit.Test)

Example 12 with FacetDescription

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)));
}
Also used : PropertyParser(nl.knaw.huygens.timbuctoo.search.description.PropertyParser) FacetDescription(nl.knaw.huygens.timbuctoo.search.description.FacetDescription) Test(org.junit.Test)

Example 13 with FacetDescription

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);
}
Also used : FacetDescription(nl.knaw.huygens.timbuctoo.search.description.FacetDescription) Test(org.junit.Test)

Example 14 with FacetDescription

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)));
}
Also used : PropertyParser(nl.knaw.huygens.timbuctoo.search.description.PropertyParser) FacetDescription(nl.knaw.huygens.timbuctoo.search.description.FacetDescription) Test(org.junit.Test)

Example 15 with FacetDescription

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);
}
Also used : FacetDescription(nl.knaw.huygens.timbuctoo.search.description.FacetDescription) Test(org.junit.Test)

Aggregations

FacetDescription (nl.knaw.huygens.timbuctoo.search.description.FacetDescription)15 Test (org.junit.Test)15 PropertyParser (nl.knaw.huygens.timbuctoo.search.description.PropertyParser)3 HashMap (java.util.HashMap)1 Set (java.util.Set)1 Vertex (org.apache.tinkerpop.gremlin.structure.Vertex)1