use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefEditorTest method testSetAsText2.
public void testSetAsText2() throws Exception {
ServiceNameRefEditor editor = new ServiceNameRefEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("Service1=Service1");
assertEquals(new ServiceNameRef("Service1", new ServiceName("Service1")), editor.getValue());
}
use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefArrayEditorTest method testSetValue2.
public void testSetValue2() throws Exception {
ServiceNameRefArrayEditor editor = new ServiceNameRefArrayEditor();
editor.setValue(new ServiceNameRef[] { new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")), new ServiceNameRef("Service2", new ServiceName("Manager2", "Service2")) });
assertEquals("Service1=Manager1#Service1" + System.getProperty("line.separator") + "Service2=Manager2#Service2", editor.getAsText());
}
use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefArrayEditorTest method testSetAsText3.
public void testSetAsText3() throws Exception {
ServiceNameRefArrayEditor editor = new ServiceNameRefArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("Service1=#Service1\nService2=Manager2#Service2");
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 ServiceNameRefArrayEditorTest method testSetValue1.
public void testSetValue1() throws Exception {
ServiceNameRefArrayEditor editor = new ServiceNameRefArrayEditor();
editor.setValue(new ServiceNameRef[] { new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")) });
assertEquals("Service1=Manager1#Service1", editor.getAsText());
}
use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.
the class ServiceNameRefArrayEditorTest method testSetAsText5.
public void testSetAsText5() throws Exception {
ServiceNameRefArrayEditor editor = new ServiceNameRefArrayEditor();
editor.setServiceManagerName("Manager1");
editor.setAsText("Service1=#Service1\n<!-- Service2=Manager2#Service2 -->\nService3=Service3");
Object val = editor.getValue();
assertEquals(2, Array.getLength(val));
assertEquals(new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")), Array.get(val, 0));
assertEquals(new ServiceNameRef("Service3", new ServiceName("Service3")), Array.get(val, 1));
}
Aggregations