Ignore:
Timestamp:
06/23/2019 10:27:35 AM (7 years ago)
Author:
jdalbey
Message:

Remove ATMS functionality. Reworked and simplified the Highway model to use only VDS data from PeMS. Updated all unit tests.

Location:
trunk/test/tmcsim/highwaymodel
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/test/tmcsim/highwaymodel/StationTest.java

    r343 r422  
    11 
    2 package atmsdriver.model; 
     2package tmcsim.highwaymodel; 
    33 
    4 import atmsdriver.model.Station.DIRECTION; 
     4import tmcsim.highwaymodel.LoopDetector; 
     5import tmcsim.highwaymodel.Station; 
     6import tmcsim.highwaymodel.Station.DIRECTION; 
    57import java.util.ArrayList; 
    68import junit.framework.TestCase; 
     
    8183    } 
    8284    /** 
    83      * TODO: Test of toXML method, of class Station. 
     85     * Test get Color and LoopDetector accessors 
    8486     */ 
    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    } 
    86102} 
Note: See TracChangeset for help on using the changeset viewer.