Ignore:
Timestamp:
12/23/14 10:53:18 (10 years ago)
Author:
pharms
Message:
  • adapted tests to bug fixes
File:
1 edited

Legend:

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

    r1402 r1845  
    174174    } 
    175175 
     176    /** 
     177     * 
     178     */ 
     179    @Test 
     180    public void test_TaskDetection_03() throws Exception { 
     181        String input = 
     182            "UserSession {" + 
     183            "  Event noise0 {}" + 
     184            "  Event a {}" + 
     185            "  Event b {}" + 
     186            "  Event c {}" + 
     187            "  Event noise1 {}" + 
     188            "  Event a {}" + 
     189            "  Event b {}" + 
     190            "  Event noise2 {}" + 
     191            "  Event b {}" + 
     192            "  Event c {}" + 
     193            "  Event noise3 {}" + 
     194            "  Event a {}" + 
     195            "  Event b {}" + 
     196            "  Event noise4 {}" + 
     197            "  Event b {}" + 
     198            "  Event c {}" + 
     199            "  Event noise5 {}" + 
     200            "}"; 
     201 
     202        String output = 
     203            "UserSession {" + 
     204            "  Event noise0 {}" + 
     205            "  Sequence sequence1 {" + 
     206            "    Event a {}" + 
     207            "    Event b {}" + 
     208            "  }" + 
     209            "  Event c {}" + 
     210            "  Event noise1 {}" + 
     211            "  Sequence sequence1 {" + 
     212            "    Event a {}" + 
     213            "    Event b {}" + 
     214            "  }" + 
     215            "  Event noise2 {}" + 
     216            "  Sequence sequence2 {" + 
     217            "    Event b {}" + 
     218            "    Event c {}" + 
     219            "  }" + 
     220            "  Event noise3 {}" + 
     221            "  Sequence sequence1 {" + 
     222            "    Event a {}" + 
     223            "    Event b {}" + 
     224            "  }" + 
     225            "  Event noise4 {}" + 
     226            "  Sequence sequence2 {" + 
     227            "    Event b {}" + 
     228            "    Event c {}" + 
     229            "  }" + 
     230            "  Event noise5 {}" + 
     231            "}"; 
     232 
     233        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output); 
     234    } 
     235 
     236    /** 
     237     * 
     238     */ 
     239    @Test 
     240    public void test_TaskDetection_04() throws Exception { 
     241        String input = 
     242            "UserSession {" + 
     243            "  Event noise0 {}" + 
     244            "  Event a {}" + 
     245            "  Event b {}" + 
     246            "  Event a {}" + 
     247            "  Event noise1 {}" + 
     248            "  Event a {}" + 
     249            "  Event b {}" + 
     250            "  Event noise2 {}" + 
     251            "  Event b {}" + 
     252            "  Event a {}" + 
     253            "  Event noise3 {}" + 
     254            "  Event a {}" + 
     255            "  Event b {}" + 
     256            "  Event noise4 {}" + 
     257            "  Event b {}" + 
     258            "  Event a {}" + 
     259            "  Event noise5 {}" + 
     260            "}"; 
     261 
     262        String output = 
     263            "UserSession {" + 
     264            "  Event noise0 {}" + 
     265            "  Sequence sequence1 {" + 
     266            "    Event a {}" + 
     267            "    Event b {}" + 
     268            "  }" + 
     269            "  Event a {}" + 
     270            "  Event noise1 {}" + 
     271            "  Sequence sequence1 {" + 
     272            "    Event a {}" + 
     273            "    Event b {}" + 
     274            "  }" + 
     275            "  Event noise2 {}" + 
     276            "  Sequence sequence2 {" + 
     277            "    Event b {}" + 
     278            "    Event a {}" + 
     279            "  }" + 
     280            "  Event noise3 {}" + 
     281            "  Sequence sequence1 {" + 
     282            "    Event a {}" + 
     283            "    Event b {}" + 
     284            "  }" + 
     285            "  Event noise4 {}" + 
     286            "  Sequence sequence2 {" + 
     287            "    Event b {}" + 
     288            "    Event a {}" + 
     289            "  }" + 
     290            "  Event noise5 {}" + 
     291            "}"; 
     292 
     293        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output); 
     294    } 
     295 
     296    /** 
     297     * 
     298     */ 
     299    @Test 
     300    public void test_TaskDetection_05() throws Exception { 
     301        String input = 
     302            "UserSession {" + 
     303            "  Event noise0 {}" + 
     304            "  Event a {}" + 
     305            "  Event b {}" + 
     306            "  Event a {}" + 
     307            "  Event noise1 {}" + 
     308            "  Event b {}" + 
     309            "  Event a {}" + 
     310            "  Event b {}" + 
     311            "  Event noise2 {}" + 
     312            "  Event b {}" + 
     313            "  Event a {}" + 
     314            "  Event c {}" + 
     315            "  Event noise2 {}" + 
     316            "  Event a {}" + 
     317            "  Event b {}" + 
     318            "  Event noise3 {}" + 
     319            "  Event a {}" + 
     320            "  Event c {}" + 
     321            "  Event noise4 {}" + 
     322            "  Event a {}" + 
     323            "  Event c {}" + 
     324            "}"; 
     325 
     326        String output = 
     327            "UserSession {" + 
     328            "  Event noise0 {}" + 
     329            "  Sequence 1 {" + 
     330            "    Event a {}" + 
     331            "    Event b {}" + 
     332            "  }" + 
     333            "  Event a {}" + 
     334            "  Event noise1 {}" + 
     335            "  Event b {}" + 
     336            "  Sequence 1 {" + 
     337            "    Event a {}" + 
     338            "    Event b {}" + 
     339            "  }" + 
     340            "  Event noise2 {}" + 
     341            "  Event b {}" + 
     342            "  Sequence 2 {" + 
     343            "    Event a {}" + 
     344            "    Event c {}" + 
     345            "  }" + 
     346            "  Event noise2 {}" + 
     347            "  Sequence 1 {" + 
     348            "    Event a {}" + 
     349            "    Event b {}" + 
     350            "  }" + 
     351            "  Event noise3 {}" + 
     352            "  Sequence 2 {" + 
     353            "    Event a {}" + 
     354            "    Event c {}" + 
     355            "  }" + 
     356            "  Event noise4 {}" + 
     357            "  Sequence 2 {" + 
     358            "    Event a {}" + 
     359            "    Event c {}" + 
     360            "  }" + 
     361            "}"; 
     362 
     363        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output); 
     364    } 
     365 
     366    /** 
     367     * 
     368     */ 
     369    @Test 
     370    public void test_TaskDetection_06() throws Exception { 
     371        String input = 
     372            "UserSession {" + 
     373            "  Event noise0 {}" + 
     374            "  Event a {}" + 
     375            "  Event b {}" + 
     376            "  Event a {}" + 
     377            "  Event noise1 {}" + 
     378            "  Event b {}" + 
     379            "  Event a {}" + 
     380            "  Event b {}" + 
     381            "  Event noise2 {}" + 
     382            "  Event a {}" + 
     383            "  Event b {}" + 
     384            "  Event a {}" + 
     385            "}"; 
     386 
     387        String output = 
     388            "UserSession {" + 
     389            "  Event noise0 {}" + 
     390            "  Sequence 1 {" + 
     391            "    Sequence 2 {" + 
     392            "      Event a {}" + 
     393            "      Event b {}" + 
     394            "    }" + 
     395            "    Event a {}" + 
     396            "  }" + 
     397            "  Event noise1 {}" + 
     398            "  Event b {}" + 
     399            "  Sequence 2 {" + 
     400            "    Event a {}" + 
     401            "    Event b {}" + 
     402            "  }" + 
     403            "  Event noise2 {}" + 
     404            "  Sequence 1 {" + 
     405            "    Sequence 2 {" + 
     406            "      Event a {}" + 
     407            "      Event b {}" + 
     408            "    }" + 
     409            "    Event a {}" + 
     410            "  }" + 
     411            "}"; 
     412 
     413        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output); 
     414    } 
     415 
     416    /** 
     417     * 
     418     */ 
     419    @Test 
     420    public void test_TaskDetection_07() throws Exception { 
     421        String input = 
     422            "UserSession {" + 
     423            "  Event noise0 {}" + 
     424            "  Event a {}" + 
     425            "  Event b {}" + 
     426            "  Event c {}" + 
     427            "  Event noise1 {}" + 
     428            "  Event b {}" + 
     429            "  Event c {}" + 
     430            "  Event a {}" + 
     431            "  Event noise2 {}" + 
     432            "  Event c {}" + 
     433            "  Event a {}" + 
     434            "  Event b {}" + 
     435            "}"; 
     436 
     437        String output = 
     438            "UserSession {" + 
     439            "  Event noise0 {}" + 
     440            "  Event a {}" + 
     441            "  Sequence 1 {" + 
     442            "    Event b {}" + 
     443            "    Event c {}" + 
     444            "  }" + 
     445            "  Event noise1 {}" + 
     446            "  Sequence 1 {" + 
     447            "    Event b {}" + 
     448            "    Event c {}" + 
     449            "  }" + 
     450            "  Event a {}" + 
     451            "  Event noise2 {}" + 
     452            "  Event c {}" + 
     453            "  Event a {}" + 
     454            "  Event b {}" + 
     455            "}"; 
     456 
     457        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output); 
     458    } 
     459 
     460    /** 
     461     * 
     462     */ 
     463    @Test 
     464    public void test_TaskDetection_08() throws Exception { 
     465        String input = 
     466            "UserSession {" + 
     467            "  Event noise0 {}" + 
     468            "  Event a {}" + 
     469            "  Event b {}" + 
     470            "  Event c {}" + 
     471            "  Event noise1 {}" + 
     472            "  Event a {}" + 
     473            "  Event b {}" + 
     474            "  Event d {}" + 
     475            "  Event noise2 {}" + 
     476            "  Event a {}" + 
     477            "  Event b {}" + 
     478            "  Event e {}" + 
     479            "  Event noise3 {}" + 
     480            "  Event b {}" + 
     481            "  Event c {}" + 
     482            "  Event d {}" + 
     483            "  Event noise4 {}" + 
     484            "  Event b {}" + 
     485            "  Event d {}" + 
     486            "  Event e {}" + 
     487            "  Event noise5 {}" + 
     488            "  Event b {}" + 
     489            "  Event d {}" + 
     490            "  Event f {}" + 
     491            "  Event noise6 {}" + 
     492            "  Event a {}" + 
     493            "  Event b {}" + 
     494            "  Event noise7 {}" + 
     495            "  Event b {}" + 
     496            "  Event c {}" + 
     497            "  Event noise8 {}" + 
     498            "  Event b {}" + 
     499            "  Event d {}" + 
     500            "  Event noise9 {}" + 
     501            "}"; 
     502 
     503        String output = 
     504            "UserSession {" + 
     505            "  Event noise0 {}" + 
     506            "  Sequence 1 {" + 
     507            "    Event a {}" + 
     508            "    Event b {}" + 
     509            "  }" + 
     510            "  Event c {}" + 
     511            "  Event noise1 {}" + 
     512            "  Sequence 1 {" + 
     513            "    Event a {}" + 
     514            "    Event b {}" + 
     515            "  }" + 
     516            "  Event d {}" + 
     517            "  Event noise2 {}" + 
     518            "  Sequence 1 {" + 
     519            "    Event a {}" + 
     520            "    Event b {}" + 
     521            "  }" + 
     522            "  Event e {}" + 
     523            "  Event noise3 {}" + 
     524            "  Sequence 2 {" + 
     525            "    Event b {}" + 
     526            "    Event c {}" + 
     527            "  }" + 
     528            "  Event d {}" + 
     529            "  Event noise4 {}" + 
     530            "  Sequence 3 {" + 
     531            "    Event b {}" + 
     532            "    Event d {}" + 
     533            "  }" + 
     534            "  Event e {}" + 
     535            "  Event noise5 {}" + 
     536            "  Sequence 3 {" + 
     537            "    Event b {}" + 
     538            "    Event d {}" + 
     539            "  }" + 
     540            "  Event f {}" + 
     541            "  Event noise6 {}" + 
     542            "  Sequence 1 {" + 
     543            "    Event a {}" + 
     544            "    Event b {}" + 
     545            "  }" + 
     546            "  Event noise7 {}" + 
     547            "  Sequence 2 {" + 
     548            "    Event b {}" + 
     549            "    Event c {}" + 
     550            "  }" + 
     551            "  Event noise8 {}" + 
     552            "  Sequence 3 {" + 
     553            "    Event b {}" + 
     554            "    Event d {}" + 
     555            "  }" + 
     556            "  Event noise9 {}" + 
     557            "}"; 
     558 
     559        applySessionScopeRule(SequenceForTaskDetectionRule.class, input, output); 
     560    } 
    176561} 
Note: See TracChangeset for help on using the changeset viewer.