Package gov.nasa.arc.mct.services.config.impl.properties

Examples of gov.nasa.arc.mct.services.config.impl.properties.SimpleProperty


 
  @Test
  public void testBadPropertyTypeConversion() {
    service = new Service();
    List<SimpleProperty> expected = new ArrayList<SimpleProperty> ();
    SimpleProperty sp = new SimpleProperty("Integer","aaaa");
    sp.setTypeName("Integer");
    expected.add(sp);   
    service.setSimpleProps(expected);
    List<SimpleProperty> actual = service.getSimpleProps();
    Assert.assertEquals(actual, expected);
   
View Full Code Here


public class MarshallingTest {
 
  @Test
  public void testPropertyMarshalling() throws JAXBException {
    SimpleProperty prop = new SimpleProperty("x", "y");
   
    String s = marshalObject(prop);
    assertTrue(s.contains("<property"));
    assertTrue(s.contains("name=\"x\""));
    assertTrue(s.contains("value=\"y\""));
View Full Code Here

 
  @Test
  public void testServiceMarshalling() throws JAXBException {
    Service service = new Service();
    service.setServiceID("myPID");
    service.getSimpleProps().add(new SimpleProperty("x", "y"));
    ArrayProperty array = new ArrayProperty("people");
    array.addEntry("john");
    array.addEntry("martha");
    service.getArrayProps().add(array);
   
View Full Code Here

    assertEquals(value.getValue(), "red");
  }

  @Test
  public void testSimplePropertyUnmarshalling() throws JAXBException {
    SimpleProperty prop;
   
    prop = (SimpleProperty) unmarshalString("<property name='color' value='red' />");
    assertEquals(prop.getName(), "color");
    assertEquals(prop.getValue(), "red");
  }
View Full Code Here

        "<service-configuration>" +
        "  <service pid='servicePID' />" +
        "</service-configuration>"
    );

    s.getSimpleProps().add(new SimpleProperty("host", "localhost"));
    s.getSimpleProps().add(new SimpleProperty("port", "7654", "Integer"));
    xml = toXML(config);
    assertEqualsXML(
        xml,
        "<service-configuration>\n" +
        "  <service pid='servicePID'>\n" +
View Full Code Here

TOP

Related Classes of gov.nasa.arc.mct.services.config.impl.properties.SimpleProperty

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.