Changeset 266 in tmcsimulator for trunk/test/atmsdriver


Ignore:
Timestamp:
02/16/2019 03:22:09 PM (7 years ago)
Author:
jdalbey
Message:

PostmileCoords?.java: Add cross street name attribute and modified toJson to include it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/atmsdriver/model/PostmileCoordsTest.java

    r248 r266  
    3737 
    3838        System.out.println("load"); 
    39         String line1 = "5 N 4.02, 33.33, -117.117\n5 S 3.56, 33.33, -117.117"; 
     39        String line1 = "5 N 4.02, 33.33, -117.117,Dyer Rd\n5 S 3.56, 33.33, -117.117,Dyer Rd"; 
    4040        Scanner scan = new Scanner(line1).useDelimiter("\\A");  
    4141        pmc = new PostmileCoords(); 
    4242        pmc.load(scan); 
    4343        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33",  
    44                 "-117.117"); 
     44                "-117.117","Dyer Rd"); 
    4545        assertEquals(pm,pmc.get(0)); 
    4646        assert(pmc.size() == 2); 
     
    4848    public void testLoadwithPrefix() throws FileNotFoundException 
    4949    { 
    50  
    5150        System.out.println("load"); 
    52         String line1 = "5 N R4.02, 33.33, -117.117\n5 S 3.56, 33.33, -117.117"; 
     51        String line1 = "5 N R4.02, 33.33, -117.117,Dyer Rd\n5 S 3.56, 33.33, -117.117,Dyer Rd"; 
    5352        Scanner scan = new Scanner(line1).useDelimiter("\\A");  
    5453        pmc = new PostmileCoords(); 
    5554        pmc.load(scan); 
    5655        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33",  
    57                 "-117.117"); 
     56                "-117.117","Dyer Rd"); 
    5857        assertEquals(pm,pmc.get(0)); 
    5958        assert(pmc.size() == 2); 
     
    7675        PostmileCoords.Postmile result = pmc.find("5 N 4.02"); 
    7776        assertNotNull(result); 
    78         PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33", "-117.117"); 
     77        PostmileCoords.Postmile pm = new PostmileCoords.Postmile("5 N 4.02", "33.33", "-117.117","Dyer Rd"); 
    7978        assertEquals(pm,result); 
    8079        PostmileCoords.Postmile result2 = pmc.find("X"); 
    8180        assertNull(result2); 
     81        System.out.println(pm.toJson()); 
    8282    } 
    8383} 
Note: See TracChangeset for help on using the changeset viewer.