Search in sources :

Example 1 with FacetDescription

use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.

the class FacetDescriptionFactoryTest method createDatableRangeFacetDescriptionWithARelationCreatesARelatedDatableRangeFacetDescription.

@Test
public void createDatableRangeFacetDescriptionWithARelationCreatesARelatedDatableRangeFacetDescription() {
    FacetDescription description = instance.createDatableRangeFacetDescription("facetName", "propertyName", "relationName");
    assertThat(description, is(instanceOf(RelatedDatableRangeFacetDescription.class)));
}
Also used : FacetDescription(nl.knaw.huygens.timbuctoo.search.description.FacetDescription) Test(org.junit.Test)

Example 2 with FacetDescription

use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.

the class FacetDescriptionFactoryTest method createListFacetDescriptionWithARelationLetsThePropertyParserFactoryCreateAParser.

@Test
public void createListFacetDescriptionWithARelationLetsThePropertyParserFactoryCreateAParser() {
    FacetDescription description = instance.createListFacetDescription("facetName", String.class, "propertyName", "relation");
    verify(parserFactory).getParser(String.class);
}
Also used : FacetDescription(nl.knaw.huygens.timbuctoo.search.description.FacetDescription) Test(org.junit.Test)

Example 3 with FacetDescription

use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.

the class FacetDescriptionFactoryTest method createDatableRangeFacetDescriptionCreatesADatableRangeFacetDescription.

@Test
public void createDatableRangeFacetDescriptionCreatesADatableRangeFacetDescription() {
    FacetDescription description = instance.createDatableRangeFacetDescription("facetName", "propertyName");
    assertThat(description, is(instanceOf(DatableRangeFacetDescription.class)));
}
Also used : FacetDescription(nl.knaw.huygens.timbuctoo.search.description.FacetDescription) Test(org.junit.Test)

Example 4 with FacetDescription

use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.

the class FacetDescriptionFactoryTest method createListFacetDescriptionWithARelationCreatesADerivedListFacetDescription.

@Test
public void createListFacetDescriptionWithARelationCreatesADerivedListFacetDescription() {
    PropertyParser parser = mock(PropertyParser.class);
    FacetDescription description = instance.createListFacetDescription("facetName", parser, "propertyName", "relation");
    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 5 with FacetDescription

use of nl.knaw.huygens.timbuctoo.search.description.FacetDescription in project timbuctoo by HuygensING.

the class FacetDescriptionFactoryTest method createKeywordFacetDescriptionCreatesADerivedListFacetDescription.

@Test
public void createKeywordFacetDescriptionCreatesADerivedListFacetDescription() {
    FacetDescription description = instance.createKeywordDescription("facetName", "relationName", "ww");
    assertThat(description, is(instanceOf(RelatedListFacetDescription.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