Changeset 1768


Ignore:
Timestamp:
09/26/14 10:46:28 (10 years ago)
Author:
pharms
Message:
  • first version of merging similar task trees
Location:
trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-tasktrees-test/src/test/java/de/ugoe/cs/autoquest/tasktrees/temporalrelation/AbstractTemporalRelationshipTC.java

    r1294 r1768  
    5454    /** */ 
    5555    private ITaskFactory taskFactory = new TaskFactory(); 
    56      
    57     /** */ 
    58     private TaskTreeDecoder decoder = null; 
    5956 
    6057    /** */ 
     
    6865        Console.reset(); 
    6966        new TextConsole(Level.FINEST); 
    70          
    71         decoder = new TaskTreeDecoder(taskFactory, taskBuilder); 
    7267    } 
    7368 
     
    128123        RuleApplicationStatus status; 
    129124         
     125        TaskTreeDecoder decoder = new TaskTreeDecoder(taskFactory, taskBuilder); 
    130126        ITaskInstance inputList = (ITaskInstance) decoder.decode(inputSpec); 
    131127         
     
    169165                                         String                             expectedOutputSpec) 
    170166    { 
     167        System.out.println("#####################################################################"); 
    171168        ISessionScopeRule rule = null; 
    172169         
     
    215212        } 
    216213         
     214        TaskTreeDecoder decoder = new TaskTreeDecoder(taskFactory, taskBuilder); 
    217215        ITaskInstanceList inputList = decoder.decode(inputSpec); 
    218          
    219216        assertTrue(inputList instanceof IUserSession); 
     217         
     218        ITaskInstanceList expectedList = decoder.decode(expectedOutputSpec); 
     219        assertTrue(expectedList instanceof IUserSession); 
     220         
     221        new TaskTreeChecker().assertEventTaskInstancesEqual(expectedList, inputList); 
     222         
     223        // reparse the input list to ensure that no doublings of task instances occurs 
     224        decoder = new TaskTreeDecoder(taskFactory, taskBuilder); 
     225        inputList = decoder.decode(inputSpec); 
    220226         
    221227        List<IUserSession> sessionList = new LinkedList<IUserSession>(); 
     
    230236        assertNotNull(result.getRuleApplicationStatus()); 
    231237             
    232         ITaskInstanceList expectedList = decoder.decode(expectedOutputSpec); 
     238        // reparse the expected list to ensure that no doublings of tasks occur 
     239        expectedList = decoder.decode(expectedOutputSpec); 
    233240         
    234241        System.out.println("\nExpected Result:"); 
     
    238245 
    239246        new TaskTreeChecker().assertTaskInstanceListsEqual(expectedList, inputList); 
    240         new TaskTreeValidator().validate(inputList); 
     247        List<IUserSession> sessions = new LinkedList<IUserSession>(); 
     248        sessions.add((IUserSession) inputList); 
     249        sessions.add((IUserSession) expectedList); 
     250        new TaskTreeValidator().validate(sessions, true); 
    241251    } 
    242252 
Note: See TracChangeset for help on using the changeset viewer.