use of com.vaadin.data.ValueContext in project cia by Hack23.
the class ListPropertyConverterTest method convertToPresentationNoValueTest.
/**
* Convert to presentation no value test.
*/
@Test
public void convertToPresentationNoValueTest() {
final ValueContext context = new ValueContext(Locale.ENGLISH);
final String emptyString = new ListPropertyConverter("partyId", "partyId").convertToPresentation(Arrays.asList(new ViewRiksdagenParty()), context);
assertEquals("[ ]", emptyString);
}
use of com.vaadin.data.ValueContext in project cia by Hack23.
the class ListPropertyConverterTest method convertToPresentationNullValueFailureTest.
/**
* Convert to presentation null value failure test.
*/
@Test
public void convertToPresentationNullValueFailureTest() {
final ValueContext context = new ValueContext(Locale.ENGLISH);
final String emptyString = new ListPropertyConverter("", null).convertToPresentation(null, context);
assertEquals("", emptyString);
}
use of com.vaadin.data.ValueContext in project cia by Hack23.
the class ListPropertyConverterTest method convertToPresentationFallbackTest.
/**
* Convert to presentation fallback test.
*/
@Test
public void convertToPresentationFallbackTest() {
final ValueContext context = new ValueContext(Locale.ENGLISH);
final String emptyString = new ListPropertyConverter("partyId", "partyId", "partyName").convertToPresentation(Arrays.asList(new ViewRiksdagenParty().withPartyName("PartyName")), context);
assertEquals("[PartyName ]", emptyString);
}
use of com.vaadin.data.ValueContext in project cia by Hack23.
the class ListPropertyConverterTest method convertToPresentationWrongPathMethodValueFailureTest.
/**
* Convert to presentation wrong path method value failure test.
*/
@Test
public void convertToPresentationWrongPathMethodValueFailureTest() {
final ValueContext context = new ValueContext(Locale.ENGLISH);
final String emptyString = new ListPropertyConverter("party", "party").convertToPresentation(Arrays.asList(new ViewRiksdagenCommittee()), context);
assertEquals("[ ]", emptyString);
}
use of com.vaadin.data.ValueContext in project cia by Hack23.
the class ListPropertyConverterTest method convertToPresentationFallbackNoValueTest.
/**
* Convert to presentation fallback no value test.
*/
@Test
public void convertToPresentationFallbackNoValueTest() {
final ValueContext context = new ValueContext(Locale.ENGLISH);
final String emptyString = new ListPropertyConverter("partyId", "partyId", "partyName").convertToPresentation(Arrays.asList(new ViewRiksdagenParty()), context);
assertEquals("[ ]", emptyString);
}
Aggregations