Changeset 422 in tmcsimulator for trunk/test/tmcsim/highwaymodel/StationTest.java
- Timestamp:
- 06/23/2019 10:27:35 AM (7 years ago)
- Location:
- trunk/test/tmcsim/highwaymodel
- Files:
-
- 1 added
- 1 copied
-
. (added)
-
StationTest.java (copied) (copied from trunk/test/atmsdriver/model/StationTest.java) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/tmcsim/highwaymodel/StationTest.java
r343 r422 1 1 2 package atmsdriver.model;2 package tmcsim.highwaymodel; 3 3 4 import atmsdriver.model.Station.DIRECTION; 4 import tmcsim.highwaymodel.LoopDetector; 5 import tmcsim.highwaymodel.Station; 6 import tmcsim.highwaymodel.Station.DIRECTION; 5 7 import java.util.ArrayList; 6 8 import junit.framework.TestCase; … … 81 83 } 82 84 /** 83 * T ODO: Test of toXML method, of class Station.85 * Test get Color and LoopDetector accessors 84 86 */ 85 87 public void testGetColor() 88 { 89 LoopDetector lane = new LoopDetector(999,"locid","loc"); 90 ArrayList<LoopDetector> lanes = new ArrayList<LoopDetector>(); 91 lanes.add(lane); 92 Station alpha = new Station(1,2,3,"A",lanes, 4, DIRECTION.NORTH, 2.0); 93 assertEquals('-',alpha.getColor().symbol()); 94 assertEquals("lime",alpha.getColor().htmlColor()); 95 lane.setAttributes(LoopDetector.DOTCOLOR.YELLOW); 96 assertEquals('+',alpha.getColor().symbol()); 97 assertEquals("yellow",alpha.getColor().htmlColor()); 98 lane.setAttributes(LoopDetector.DOTCOLOR.RED); 99 assertEquals('@',alpha.getColor().symbol()); 100 assertEquals("red",alpha.getColor().htmlColor()); 101 } 86 102 }
Note: See TracChangeset
for help on using the changeset viewer.
