use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefArrayEditorTest method testSetAsText1.
public void testSetAsText1() throws Exception {
ServiceNameRefArrayEditor editor = new ServiceNameRefArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("Service1=#Service1");
Object val = editor.getValue();
assertEquals(1, Array.getLength(val));
assertEquals(new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")), Array.get(val, 0));
}
use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefArrayEditorTest method testSetAsText2.
public void testSetAsText2() throws Exception {
ServiceNameRefArrayEditor editor = new ServiceNameRefArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("Service1=#Service1\n");
Object val = editor.getValue();
assertEquals(1, Array.getLength(val));
assertEquals(new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")), Array.get(val, 0));
}
use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefArrayEditorTest method testSetAsText4.
public void testSetAsText4() throws Exception {
ServiceNameRefArrayEditor editor = new ServiceNameRefArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText(" \t Service1=#Service1\n Service2=Manager2#Service2 \n Service3=Service3 ");
Object val = editor.getValue();
assertEquals(3, Array.getLength(val));
assertEquals(new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")), Array.get(val, 0));
assertEquals(new ServiceNameRef("Service2", new ServiceName("Manager2", "Service2")), Array.get(val, 1));
assertEquals(new ServiceNameRef("Service3", new ServiceName("Service3")), Array.get(val, 2));
}
use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefArrayEditorTest method testSetAsText6.
public void testSetAsText6() throws Exception {
ServiceNameRefArrayEditor editor = new ServiceNameRefArrayEditor();
editor.setServiceManagerName("Manager1");
System.setProperty("test.ServiceNameRefArrayEditor.value", "Manager2#Service2");
editor.setAsText("Service1=#Service1\nService2=${test.ServiceNameRefArrayEditor.value}");
Object val = editor.getValue();
assertEquals(2, Array.getLength(val));
assertEquals(new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")), Array.get(val, 0));
assertEquals(new ServiceNameRef("Service2", new ServiceName("Manager2", "Service2")), Array.get(val, 1));
}
use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefEditorTest method testSetAsText3.
public void testSetAsText3() throws Exception {
ServiceNameRefEditor editor = new ServiceNameRefEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("Service1=Manager2#Service1");
assertEquals(new ServiceNameRef("Service1", new ServiceName("Manager2", "Service1")), editor.getValue());
}
Aggregations