Search in sources :

Example 11 with ServiceNameRef

use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.

the class ServiceNameRefEditorTest method testSetAsText1.

public void testSetAsText1() throws Exception {
    ServiceNameRefEditor editor = new ServiceNameRefEditor();
    editor.setServiceManagerName("Manager1");
    editor.setAsText("Service1=#Service1");
    assertEquals(new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")), editor.getValue());
}
Also used : ServiceName(jp.ossc.nimbus.core.ServiceName) ServiceNameRef(jp.ossc.nimbus.core.ServiceNameRef)

Example 12 with ServiceNameRef

use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.

the class ServiceNameRefEditorTest method testSetValue1.

public void testSetValue1() throws Exception {
    ServiceNameRefEditor editor = new ServiceNameRefEditor();
    editor.setValue(new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")));
    assertEquals("Service1=Manager1#Service1", editor.getAsText());
}
Also used : ServiceName(jp.ossc.nimbus.core.ServiceName) ServiceNameRef(jp.ossc.nimbus.core.ServiceNameRef)

Example 13 with ServiceNameRef

use of jp.ossc.nimbus.core.ServiceNameRef in project nimbus by nimbus-org.

the class ServiceNameRefEditorTest method testSetAsText4.

public void testSetAsText4() throws Exception {
    ServiceNameRefEditor editor = new ServiceNameRefEditor();
    System.setProperty("test.ServiceNameRefEditor.value", "Manager1#Service1");
    editor.setAsText("Service1=${test.ServiceNameRefEditor.value}");
    assertEquals(new ServiceNameRef("Service1", new ServiceName("Manager1", "Service1")), editor.getValue());
}
Also used : ServiceName(jp.ossc.nimbus.core.ServiceName) ServiceNameRef(jp.ossc.nimbus.core.ServiceNameRef)

Aggregations

ServiceName (jp.ossc.nimbus.core.ServiceName)13 ServiceNameRef (jp.ossc.nimbus.core.ServiceNameRef)13