Ignore:
Timestamp:
03/06/15 10:24:54 (10 years ago)
Author:
sherbold
Message:
  • updated model validation to report violation counts
  • code documentation
File:
1 edited

Legend:

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

    r1898 r1900  
    4242import de.ugoe.cs.autoquest.usageprofiles.FirstOrderMarkovModel; 
    4343import de.ugoe.cs.autoquest.usageprofiles.IStochasticProcess; 
    44 import de.ugoe.cs.util.console.Console; 
    4544import de.ugoe.cs.util.console.TextConsole; 
    4645 
     
    5857    @BeforeClass 
    5958    public static void setUpBeforeClass() throws Exception { 
    60         Console.getInstance().registerTraceListener(new TextConsole(Level.INFO)); 
     59        new TextConsole(Level.INFO); 
    6160    } 
    6261     
     
    316315                .getSystemResourceAsStream("testCreateInteractionFromEventSequence_1_model.uml")); 
    317316         
    318         UMLUtils.validateModelWithLog(httpSequences, model, null); 
     317        int violations = UMLUtils.validateModelWithLog(httpSequences, model, null); 
     318        if( violations==0 ) { 
     319            System.out.println("No problems found."); 
     320        } else { 
     321                System.out.println(violations + " violations found."); 
     322        } 
    319323    } 
    320324     
     
    336340                .getSystemResourceAsStream("testCreateInteractionFromEventSequence_2_model.uml")); 
    337341         
    338         UMLUtils.validateModelWithLog(httpSequences, model, null); 
     342        int violations = UMLUtils.validateModelWithLog(httpSequences, model, null); 
     343        if( violations==0 ) { 
     344            System.out.println("No problems found."); 
     345        } else { 
     346            System.out.println(violations + " violations found."); 
     347        } 
    339348    } 
    340349     
     
    356365                .getSystemResourceAsStream("hl7model_v2.uml")); 
    357366         
    358         UMLUtils.validateModelWithLog(httpSequences, model, "IXSTestSuite_1"); 
     367        int violations = UMLUtils.validateModelWithLog(httpSequences, model, "IXSTestSuite_1"); 
     368        if( violations==0 ) { 
     369            System.out.println("No problems found."); 
     370        } else { 
     371            System.out.println(violations + " violations found."); 
     372        } 
    359373    } 
    360374 
Note: See TracChangeset for help on using the changeset viewer.