Esempio n. 1
0
 /** Test method for {@link at.ac.tuwien.auto.calimero.datapoint.StateDP#toString()}. */
 public final void testToString() {
   final Datapoint dp = new StateDP(ga, "test");
   System.out.println(dp);
   assertTrue(dp.toString().indexOf("test") >= 0);
   assertTrue(dp.toString().indexOf("state DP") >= 0);
   assertTrue(dp.toString().indexOf(ga.toString()) >= 0);
 }
Esempio n. 2
0
 /**
  * Test method for {@link at.ac.tuwien.auto.calimero.datapoint.StateDP#StateDP(
  * at.ac.tuwien.auto.calimero.GroupAddress, java.lang.String, int, java.lang.String)}.
  */
 public final void testStateDPGroupAddressStringIntString() {
   final Datapoint dp = new StateDP(ga, "test", 1, "1.001");
   assertEquals(ga, dp.getMainAddress());
   assertEquals("test", dp.getName());
   assertTrue(dp.isStateBased());
   assertEquals(1, dp.getMainNumber());
   assertEquals("1.001", dp.getDPT());
 }
Esempio n. 3
0
 /**
  * Test method for {@link at.ac.tuwien.auto.calimero.datapoint.StateDP#StateDP(
  * at.ac.tuwien.auto.calimero.GroupAddress, java.lang.String)}.
  */
 public final void testStateDPGroupAddressString() {
   final Datapoint dp2 = new StateDP(ga, "test");
   assertTrue(dp2.isStateBased());
 }
Esempio n. 4
0
 /**
  * Test method for {@link Datapoint#create(XMLReader)}.
  *
  * @throws KNXMLException
  */
 public final void testCreate() throws KNXMLException {
   final XMLReader r = XMLFactory.getInstance().createXMLReader(dpFile);
   assertTrue(Datapoint.create(r) instanceof StateDP);
   r.close();
 }