Ignore:
Timestamp:
11/03/2017 02:55:08 PM (8 years ago)
Author:
jdalbey
Message:

TrafficModelManager?.java: Modify readBatchFile() to ignore blank lines in events file. Add unit test for this feature.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/tmcsim/cadsimulator/managers/TrafficModelManagerTest.java

    r204 r220  
    3535    } 
    3636 
    37     /** 
    38      * Test of readBatchFile method, of class TrafficModelManager. 
    39      */ 
    4037    public void testReadBatchFile() throws SimulationException, ParseException 
    4138    { 
     
    5552        assertEquals(expResult, result); 
    5653    } 
    57      
     54    /** 
     55     * Test of readBatchFile method, of class TrafficModelManager. 
     56     */ 
     57    public void testReadBatchFile2() throws SimulationException, ParseException 
     58    { 
     59        System.out.println("readBatchFile blank lines test"); 
     60        String alpha = "    "; 
     61        String bravo = "187 00:00:37  55 S 6.88 0.2 R"; 
     62        String dataIn = alpha + "\n" + bravo + "\n"; 
     63        Scanner scan = new Scanner(dataIn); 
     64         
     65        LinkedList<TrafficEvent> result = TrafficModelManager.readBatchFile(scan); 
     66        assertEquals(1,result.size()); 
     67    } 
     68         
    5869    public void testCreateIncidentMap() throws ParseException 
    5970    { 
Note: See TracChangeset for help on using the changeset viewer.