use of au.gov.asd.tac.constellation.graph.schema.visual.attribute.objects.LayerName in project constellation by constellation-app.
the class LayerNameAttributeDescriptionNGTest method testConvertFromString.
/**
* Test of convertFromString method, of class LayerNameAttributeDescription.
*/
@Test
public void testConvertFromString() {
System.out.println("convertFromString");
final LayerNameAttributeDescription instance = new LayerNameAttributeDescription();
final LayerName nullResult = instance.convertFromString(null);
assertEquals(nullResult, new LayerName(Graph.NOT_FOUND, "DEFAULT"));
final LayerName blankResult = instance.convertFromString(" ");
assertEquals(blankResult, new LayerName(Graph.NOT_FOUND, "DEFAULT"));
final LayerName defaultResult = instance.convertFromString("DEFAULT");
assertEquals(defaultResult, new LayerName(Graph.NOT_FOUND, "DEFAULT"));
final LayerName invalidResult = instance.convertFromString("Not a Layer");
assertNull(invalidResult);
final LayerName validResult = instance.convertFromString("3,Test Layer");
assertEquals(validResult, new LayerName(3, "Test Layer"));
}
Aggregations