use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.
the class ServiceNameArrayEditorTest method testSetAsText6.
public void testSetAsText6() throws Exception {
ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
editor.setServiceManagerName("Manager1");
System.setProperty("test.ServiceNameArrayEditor.value", "Manager2#Service2");
editor.setAsText("#Service1\n${test.ServiceNameArrayEditor.value}");
Object val = editor.getValue();
assertEquals(2, Array.getLength(val));
assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
assertEquals(new ServiceName("Manager2", "Service2"), Array.get(val, 1));
}
use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.
the class ServiceNameArrayEditorTest method testSetAsText2.
public void testSetAsText2() throws Exception {
ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("#Service1\n");
Object val = editor.getValue();
assertEquals(1, Array.getLength(val));
assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
}
use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.
the class ServiceNameArrayEditorTest method testSetAsText5.
public void testSetAsText5() throws Exception {
ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("#Service1\n<!-- Manager2#Service2 -->\nService3");
Object val = editor.getValue();
assertEquals(2, Array.getLength(val));
assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
assertEquals(new ServiceName("Nimbus", "Service3"), Array.get(val, 1));
}
use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.
the class ServiceNameArrayEditorTest method testSetAsText3.
public void testSetAsText3() throws Exception {
ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("#Service1\nManager2#Service2");
Object val = editor.getValue();
assertEquals(2, Array.getLength(val));
assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
assertEquals(new ServiceName("Manager2", "Service2"), Array.get(val, 1));
}
use of jp.ossc.nimbus.core.ServiceName in project nimbus by nimbus-org.
the class ServiceNameArrayEditorTest method testSetAsText4.
public void testSetAsText4() throws Exception {
ServiceNameArrayEditor editor = new ServiceNameArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText(" \t #Service1\n Manager2#Service2 \n Service3 ");
Object val = editor.getValue();
assertEquals(3, Array.getLength(val));
assertEquals(new ServiceName("Manager1", "Service1"), Array.get(val, 0));
assertEquals(new ServiceName("Manager2", "Service2"), Array.get(val, 1));
assertEquals(new ServiceName("Nimbus", "Service3"), Array.get(val, 2));
}
Aggregations