|
From: Bob J. <jac...@us...> - 2002-03-31 19:07:10
|
Update of /cvsroot/jmri/test/jmri
In directory usw-pr-cvs1:/tmp/cvs-serv5843
Modified Files:
AbstractTurnoutMgrTest.java
Log Message:
remove a bunch of assert deprecation wanrings
Index: AbstractTurnoutMgrTest.java
===================================================================
RCS file: /cvsroot/jmri/test/jmri/AbstractTurnoutMgrTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** AbstractTurnoutMgrTest.java 2 Mar 2002 20:13:24 -0000 1.1.1.1
--- AbstractTurnoutMgrTest.java 31 Mar 2002 19:07:03 -0000 1.2
***************
*** 1,10 ****
! /**
* AbstractTurnoutMgrTest.java
*
* Description: AbsBaseClass for TurnoutManager tests in specific jmrix. packages
* @author Bob Jacobsen
! * @version
*/
!
/**
* This is not itself a test class, e.g. should not be added to a suite. Instead,
--- 1,10 ----
! /**
* AbstractTurnoutMgrTest.java
*
* Description: AbsBaseClass for TurnoutManager tests in specific jmrix. packages
* @author Bob Jacobsen
! * @version
*/
!
/**
* This is not itself a test class, e.g. should not be added to a suite. Instead,
***************
*** 29,37 ****
abstract public void setUp(); // load t with actual object; create scaffolds as needed
abstract public String getSystemName(int i);
!
public AbstractTurnoutMgrTest(String s) {
super(s);
}
!
protected TurnoutManager l = null; // holds objects under test
--- 29,37 ----
abstract public void setUp(); // load t with actual object; create scaffolds as needed
abstract public String getSystemName(int i);
!
public AbstractTurnoutMgrTest(String s) {
super(s);
}
!
protected TurnoutManager l = null; // holds objects under test
***************
*** 42,56 ****
}
}
!
// start of common tests
!
// test creation - real work is in the setup() routine
public void testCreate() {
}
!
public void testDispose() throws JmriException {
l.dispose(); // all we're really doing here is making sure the method exists
! }
!
public void testTurnoutPutGet() {
// create
--- 42,56 ----
}
}
!
// start of common tests
!
// test creation - real work is in the setup() routine
public void testCreate() {
}
!
public void testDispose() throws JmriException {
l.dispose(); // all we're really doing here is making sure the method exists
! }
!
public void testTurnoutPutGet() {
// create
***************
*** 59,63 ****
Assert.assertTrue("real object ", t != null);
Assert.assertTrue("user name ", t == l.getByUserName("mine"));
! Assert.assertTrue("system name ", t == l.getBySystemName(getSystemName(21)));
}
--- 59,63 ----
Assert.assertTrue("real object ", t != null);
Assert.assertTrue("user name ", t == l.getByUserName("mine"));
! Assert.assertTrue("system name ", t == l.getBySystemName(getSystemName(21)));
}
***************
*** 68,72 ****
Assert.assertTrue("real object ", t != null);
Assert.assertTrue("user name ", t == l.getByUserName("21"));
! Assert.assertTrue("system name ", t == l.getBySystemName(getSystemName(21)));
}
--- 68,72 ----
Assert.assertTrue("real object ", t != null);
Assert.assertTrue("user name ", t == l.getByUserName("21"));
! Assert.assertTrue("system name ", t == l.getBySystemName(getSystemName(21)));
}
***************
*** 77,81 ****
Assert.assertTrue("same by user ", t1 == l.getByUserName("mine"));
Assert.assertTrue("same by system ", t1 == l.getBySystemName(getSystemName(21)));
!
Turnout t2 = l.newTurnout(getSystemName(21), "mine");
Assert.assertTrue("t2 real object ", t2 != null);
--- 77,81 ----
Assert.assertTrue("same by user ", t1 == l.getByUserName("mine"));
Assert.assertTrue("same by system ", t1 == l.getBySystemName(getSystemName(21)));
!
Turnout t2 = l.newTurnout(getSystemName(21), "mine");
Assert.assertTrue("t2 real object ", t2 != null);
***************
*** 87,95 ****
// sample address object
TurnoutAddress a = new TurnoutAddress(getSystemName(31), "user");
!
// try to get nonexistant turnouts
! assert(null == l.getByAddress(a));
! assert(null == l.getByUserName("foo"));
! assert(null == l.getBySystemName("bar"));
}
--- 87,95 ----
// sample address object
TurnoutAddress a = new TurnoutAddress(getSystemName(31), "user");
!
// try to get nonexistant turnouts
! Assert.assertTrue(null == l.getByAddress(a));
! Assert.assertTrue(null == l.getByUserName("foo"));
! Assert.assertTrue(null == l.getBySystemName("bar"));
}
|