Ignore:
Timestamp:
03/05/15 17:19:36 (10 years ago)
Author:
sherbold
Message:
  • UMLUtils can now find test contexts within packages
  • UMLUtils can now work with components that implement multiple interfaces
  • UMLUtils can now create synchronous and asynchronous messages
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-plugin-uml-test/src/test/java/de/ugoe/cs/autoquest/plugin/uml/UMLUtilsTest.java

    r1835 r1896  
    162162            } 
    163163 
    164             UMLUtils.createInteractionFromEventSequence(httpSequence, model, "testSequence"); 
     164            UMLUtils.createInteractionFromEventSequence(httpSequence, model, "testSequence", null); 
    165165        } 
    166166 
     
    194194            } 
    195195 
    196             UMLUtils.createInteractionFromEventSequence(httpSequence, model, "testSequence"); 
     196            UMLUtils.createInteractionFromEventSequence(httpSequence, model, "testSequence", null); 
     197        } 
     198 
     199        ModelUtils.writeModelToFile(model, OUTPUT_DIR + "testCreateInteractionFromEventSequence_2_result.uml"); 
     200         
     201    } 
     202     
     203    @Test 
     204    public void testHL7v2_1() throws Exception { 
     205        // parse log file 
     206        HTTPLogParser parser = 
     207            new HTTPLogParser(new File(ClassLoader 
     208                .getSystemResource("hl7_servicenamemap.txt") 
     209                .getFile())); 
     210        parser 
     211            .parseFile(new File(ClassLoader 
     212                .getSystemResource("testCreateInteractionFromEventSequence_1_usagedata.log") 
     213                .getFile())); 
     214        Collection<List<Event>> httpSequences = parser.getSequences(); 
     215 
     216         
     217        Model model = 
     218            ModelUtils.loadModel(ClassLoader 
     219                .getSystemResourceAsStream("hl7model_v2.uml")); 
     220 
     221        for (List<Event> httpSequence : httpSequences) { 
     222            for (Iterator<Event> eventIter = httpSequence.iterator(); eventIter.hasNext();) { 
     223                Event event = eventIter.next(); 
     224                if (!(event.getType() instanceof SOAPEventType)) { 
     225                    eventIter.remove(); 
     226                } 
     227            } 
     228 
     229            UMLUtils.createInteractionFromEventSequence(httpSequence, model, "testSequence", "RLUSTestSuite_1"); 
    197230        } 
    198231 
     
    236269        int[] lengths = new int[genSeqs.size()]; 
    237270        for (List<Event> seq : genSeqs) { 
    238             UMLUtils.createInteractionFromEventSequence(seq, model, "seq_" + i); 
     271            UMLUtils.createInteractionFromEventSequence(seq, model, "seq_" + i, null); 
    239272            lengths[i - 1] = seq.size(); 
    240273            i++; 
     
    257290        IStochasticProcess usageProfile = (IStochasticProcess) SerializationUtils.deserialize(ClassLoader.getSystemResourceAsStream("testCreateScheduling_1_usageprofile.dat")); 
    258291         
    259         UMLUtils.createScheduling(model, usageProfile); 
     292        UMLUtils.createScheduling(model, usageProfile, null); 
    260293         
    261294        ModelUtils.writeModelToFile(model, OUTPUT_DIR + "testCreateScheduling_1_result.uml"); 
Note: See TracChangeset for help on using the changeset viewer.