Ejemplo n.º 1
0
 @Test
 public void testIdAndBmlId() {
   StubBehaviour b = new StubBehaviour("bml1");
   b.readXML("<stubbehaviour " + TestUtil.getDefNS() + "id=\"bml2:beh1\"/>");
   assertEquals("bml2", b.bmlId);
   assertEquals("beh1", b.id);
 }
Ejemplo n.º 2
0
 @Test
 public void testDescription() {
   BMLInfo.addDescriptionExtension(StubDescription.xmlTag(), StubDescription.class);
   BMLInfo.supportedExtensions.add(StubDescription.class);
   StubBehaviour b = new StubBehaviour("bml1");
   b.readXML(
       "<stubbehaviour "
           + TestUtil.getDefNS()
           + "id=\"bml2:beh1\"><description priority=\"1\" type=\""
           + StubDescription.xmlTag()
           + "\"><stubdescription/></description></stubbehaviour>");
   assertNotNull(b.descBehaviour);
   Behaviour bdesc = b.descBehaviour;
   assertEquals("beh1", bdesc.id);
   assertEquals("bml2", bdesc.bmlId);
 }
Ejemplo n.º 3
0
 @Test
 public void testGetFloatThroughString() {
   StubBehaviour b = new StubBehaviour("bml1");
   b.readXML("<stubbehaviour " + TestUtil.getDefNS() + "id=\"beh1\"/>");
   assertEquals(1, Float.parseFloat(b.getStringParameterValue("test")), PRECISION);
 }