use of nl.knaw.huygens.timbuctoo.model.PersonNameBuilder in project timbuctoo by HuygensING.
the class PersonNameBuilderTest method testTwoComponentsReversed.
@Test
public void testTwoComponentsReversed() {
PersonNameBuilder builder = new PersonNameBuilder();
builder.addComponent(new PersonNameComponent(Type.SURNAME, "Huygens"));
builder.addComponent(new PersonNameComponent(Type.FORENAME, "Christiaan"));
assertThat(builder.getName(), equalTo("Huygens, Christiaan"));
}
use of nl.knaw.huygens.timbuctoo.model.PersonNameBuilder in project timbuctoo by HuygensING.
the class PersonNameBuilderTest method testOneComponent.
@Test
public void testOneComponent() {
PersonNameBuilder builder = new PersonNameBuilder();
builder.addComponent(new PersonNameComponent(Type.FORENAME, "Christiaan"));
assertThat(builder.getName(), equalTo("Christiaan"));
}
use of nl.knaw.huygens.timbuctoo.model.PersonNameBuilder in project timbuctoo by HuygensING.
the class PersonNameBuilderTest method testTwoComponents.
@Test
public void testTwoComponents() {
PersonNameBuilder builder = new PersonNameBuilder();
builder.addComponent(new PersonNameComponent(Type.FORENAME, "Christiaan"));
builder.addComponent(new PersonNameComponent(Type.SURNAME, "Huygens"));
assertThat(builder.getName(), equalTo("Christiaan Huygens"));
}
Aggregations