Changeset 1205


Ignore:
Timestamp:
05/01/13 14:33:31 (12 years ago)
Author:
adeicke
Message:

Fixing taskmodel specs and apply renaming refactoring (UsagePattern? -> InteractionPattern?).

Location:
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsAndEndsWithEventTest.java

    r1171 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    4646                      "}"; 
    4747        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    48         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).contains(TEXT_INPUT).endsWith(TEXT_INPUT).build(); 
     48        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).contains(TEXT_INPUT).endsWith(TEXT_INPUT).build(); 
    4949        // When 
    5050        boolean patternContained = pattern.containedIn(taskTree); 
     
    6666                      "}"; 
    6767        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    68         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     68        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    6969        // When 
    7070        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsEventTest.java

    r1171 r1205  
    2323 
    2424import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    25 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     25import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2727import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2828 
     
    4545                      "}"; 
    4646        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    47         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).contains(TEXT_INPUT).build(); 
     47        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).contains(TEXT_INPUT).build(); 
    4848        // When 
    4949        boolean patternContained = pattern.containedIn(taskTree); 
     
    6464                      "}"; 
    6565        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    66         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).build(); 
     66        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).build(); 
    6767        // When 
    6868        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/contains/ContainsPatternTest.java

    r1171 r1205  
    2323 
    2424import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    25 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     25import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2727import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2828 
     
    5050                      "}"; 
    5151        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    52         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    53         UsagePattern containsPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(TEXT_INPUT).build(); 
    54         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).contains(containsPattern).build(); 
     52        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     53        InteractionPattern containsPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(TEXT_INPUT).build(); 
     54        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).contains(containsPattern).build(); 
    5555        // When 
    5656        boolean patternContained = pattern.containedIn(taskTree); 
     
    7979                      "}"; 
    8080        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    81         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).build(); 
     81        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SELECTION).contains(TEXT_INPUT).build(); 
    8282        // When 
    8383        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithEventTest.java

    r1171 r1205  
    2222 
    2323import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    24 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    25 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     24import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     25import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2626import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2727 
     
    5252                      "}"; 
    5353        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    54         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).endsWith(TEXT_INPUT).build(); 
     54        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).endsWith(TEXT_INPUT).build(); 
    5555        // When 
    5656        boolean patternContained = pattern.containedIn(taskTree); 
     
    8383                      "}"; 
    8484        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    85         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).endsWith(TEXT_INPUT).build(); 
     85        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).endsWith(TEXT_INPUT).build(); 
    8686        // When 
    8787        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/endswith/EndsWithPatternTest.java

    r1171 r1205  
    2525 
    2626import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    28 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     28import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2929import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    3030 
     
    3939 
    4040    @Test 
    41     public void starts_with_pattern_positive() { 
     41    public void ends_with_pattern_positive() { 
    4242        // Given 
    4343        String spec = "UserSession {" + 
     
    4848                      "      Sequence seq2 {" + 
    4949                      "        TextInput target4 {}" + 
    50                       "        MouseClick target2 {}" + 
     50                      "        MouseClick target5 {}" + 
    5151                      "      }" + 
    5252                      "    }" + 
     
    5454                      "      Sequence seq3 {" + 
    5555                      "        TextInput target4 {}" + 
    56                       "        EventTask target2 {}" + 
     56                      "        EventTask target3 {}" + 
    5757                      "      }" + 
    5858                      "    }" + 
     
    6060                      "}"; 
    6161        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    62         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    63         UsagePattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    64         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).endsWith(endsWithPattern).build(); 
     62        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     63        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     64        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).endsWith(endsWithPattern).build(); 
    6565        // When 
    6666        boolean patternContained = pattern.containedIn(taskTree); 
     
    7070     
    7171    @Test 
    72     public void starts_with_pattern_negative() { 
     72    public void ends_with_pattern_negative() { 
    7373        // Given 
    7474        String spec = "UserSession {" + 
    75                               "  Selection sel1 {" + 
    76                       "    Sequence seq1 {" + 
    77                       "      EventTask target1 {}" + 
    78                       "      EventTask target2 {}" + 
    79                       "    }" + 
    80                       "  }" + 
    81                       "  Selection sel1 {" + 
    82                       "    Iteration it1 {" + 
    83                       "      Sequence seq2 {" + 
    84                       "        MouseClick target5 {}" + 
    85                       "        EventTask target4 {}" + 
     75                              "  Sequence seg0 {" + 
     76                              "    Selection sel1 {" + 
     77                      "      Sequence seq1 {" + 
     78                      "        EventTask target1 {}" + 
    8679                      "        EventTask target2 {}" + 
    8780                      "      }" + 
    8881                      "    }" + 
    89                       "  }" + 
    90                       "  Selection sel1 {" + 
    91                       "    Sequence seq3 {" + 
    92                       "      EventTask target5 {}" + 
    93                       "      EventTask target6 {}" + 
     82                      "    Selection sel1 {" + 
     83                      "      Iteration it1 {" + 
     84                      "        Sequence seq2 {" + 
     85                      "          MouseClick target5 {}" + 
     86                      "          EventTask target4 {}" + 
     87                      "          EventTask target2 {}" + 
     88                      "        }" + 
     89                      "      }" + 
     90                      "    }" + 
     91                      "    Selection sel1 {" + 
     92                      "      Sequence seq3 {" + 
     93                      "        EventTask target5 {}" + 
     94                      "        EventTask target6 {}" + 
     95                      "      }" + 
    9496                      "    }" + 
    9597                      "  }" + 
    9698                      "}"; 
    9799        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    98         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    99         UsagePattern endsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).contains(TEXT_INPUT).build(); 
    100         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).endsWith(endsWithPattern).build(); 
     100        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     101        InteractionPattern endsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).contains(TEXT_INPUT).build(); 
     102        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).endsWith(endsWithPattern).build(); 
    101103        // When 
    102104        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventAndContainsEventTest.java

    r1170 r1205  
    2323 
    2424import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    25 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     25import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2727import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2828 
     
    5252                      "}"; 
    5353        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    54         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     54        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    5555        // When 
    5656        boolean patternContained = pattern.containedIn(taskTree); 
     
    8383                      "}"; 
    8484        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    85         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     85        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    8686        // When 
    8787        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithEventTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    5252                      "}"; 
    5353        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    54         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     54        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    5555        // When 
    5656        boolean patternContained = pattern.containedIn(taskTree); 
     
    7676                      "}"; 
    7777        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    78         UsagePattern pattern = new UsagePatternBuilder().concernedNode(ITERATION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     78        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(ITERATION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    7979        // When 
    8080        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternAndContainsPatternTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    5555                      "}"; 
    5656        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    57         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    58         UsagePattern startsWithPattern = builder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
    59         UsagePattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    60         UsagePattern endsWithPattern = builder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 
    61         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).endsWith(endsWithPattern).build(); 
     57        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     58        InteractionPattern startsWithPattern = builder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
     59        InteractionPattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     60        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 
     61        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).endsWith(endsWithPattern).build(); 
    6262        // When 
    6363        boolean patternContained = pattern.containedIn(taskTree); 
     
    8484                      "}"; 
    8585        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    86         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    87         UsagePattern startsWithPattern = builder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
    88         UsagePattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    89         UsagePattern endsWithPattern = builder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 
    90         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).endsWith(endsWithPattern).build(); 
     86        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     87        InteractionPattern startsWithPattern = builder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
     88        InteractionPattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     89        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 
     90        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).endsWith(endsWithPattern).build(); 
    9191        // When 
    9292        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsAndEndsWithPatternTest.java

    r1170 r1205  
    2525 
    2626import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    28 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     28import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2929import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    3030 
     
    5959                      "}"; 
    6060        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    61         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    62         UsagePattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
    63         UsagePattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    64         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(endsWithPattern).build(); 
     61        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     62        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
     63        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     64        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(endsWithPattern).build(); 
    6565        // When 
    6666        boolean patternContained = pattern.containedIn(taskTree); 
     
    9090                      "}"; 
    9191        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    92         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    93         UsagePattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
    94         UsagePattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    95         UsagePattern pattern = patternBuilder.concernedNode(ITERATION).startsWith(endsWithPattern).endsWith(startsWithPattern).build(); 
     92        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     93        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
     94        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     95        InteractionPattern pattern = patternBuilder.concernedNode(ITERATION).startsWith(endsWithPattern).endsWith(startsWithPattern).build(); 
    9696        // When 
    9797        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsEventTest.java

    r1170 r1205  
    2323 
    2424import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    25 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     25import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2727import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2828 
     
    5151                      "}"; 
    5252        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    53         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build(); 
     53        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build(); 
    5454        // When 
    5555        boolean patternContained = pattern.containedIn(taskTree); 
     
    8282                      "}"; 
    8383        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    84         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build(); 
     84        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build(); 
    8585        // When 
    8686        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndContainsPatternTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    4444                      "    TextInput t1 {}" + 
    4545                      "    Selection sel1 {" + 
    46                       "      Sequence seq1 {" + 
     46                      "      Sequence seq2 {" + 
    4747                      "        MouseClick t2 {}" + 
    4848                      "      }" + 
    4949                      "    }" + 
    5050                      "    Selection sel1 {" + 
    51                       "      Sequence seq1 {" + 
    52                       "        TextInput t3 {}" + 
     51                      "      Sequence seq3 {" + 
     52                      "        EventTask t3 {}" + 
     53                      "        MouseClick t5 {}" + 
    5354                      "      }" + 
    5455                      "    }" + 
     
    5657                      "}"; 
    5758        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    58         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    59         UsagePattern containedPattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).build(); 
    60         UsagePattern pattern = builder.concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).build(); 
     59        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     60        InteractionPattern endsWithPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).build(); 
     61        InteractionPattern pattern = builder.concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build(); 
    6162        // When 
    6263        boolean patternContained = pattern.containedIn(taskTree); 
     
    9293                      "}"; 
    9394        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    94         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    95         UsagePattern containedPattern = builder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    96         UsagePattern pattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).contains(containedPattern).build(); 
     95        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     96        InteractionPattern endsWithPattern = builder.concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     97        InteractionPattern pattern = builder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
    9798        // When 
    9899        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventAndEndsWithPatternTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    5050                      "}"; 
    5151        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    52         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    53         UsagePattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
    54         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
     52        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     53        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
     54        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
    5555        // When 
    5656        boolean patternContained = pattern.containedIn(taskTree); 
     
    7272                      "}"; 
    7373        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    74         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    75         UsagePattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
    76         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
     74        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     75        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
     76        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
    7777        // When 
    7878        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsEventEndsWithPatternTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    5050                      "}"; 
    5151        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    52         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    53         UsagePattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
    54         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build(); 
     52        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     53        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
     54        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build(); 
    5555        // When 
    5656        boolean patternContained = pattern.containedIn(taskTree); 
     
    7272                      "}"; 
    7373        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    74         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    75         UsagePattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
    76         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build(); 
     74        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     75        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
     76        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).endsWith(endsWithPattern).build(); 
    7777        // When 
    7878        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithEventTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    5252                      "      MouseClick t2 {}" + 
    5353                      "    }" + 
    54                       "  }" + 
    55                       "  TextInput t3 {}" + 
    56                       "  MouseClick t2 {}" + 
    57                       "  Iteration iter1 {" + 
    58                       "    TextInput t4 {}" + 
     54                      "    TextInput t3 {}" + 
     55                      "    MouseClick t2 {}" + 
     56                      "    Iteration iter1 {" + 
     57                      "      TextInput t4 {}" + 
     58                      "    }" + 
    5959                      "  }" +  
    6060                      "}"; 
    6161        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    62         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    63         UsagePattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    64         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(TEXT_INPUT).build(); 
     62        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     63        InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     64        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(TEXT_INPUT).build(); 
    6565        // When 
    6666        boolean patternContained = pattern.containedIn(taskTree); 
     
    9292                      "}"; 
    9393        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    94         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    95         UsagePattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    96         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(TEXT_INPUT).build(); 
     94        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     95        InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     96        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(TEXT_INPUT).build(); 
    9797        // When 
    9898        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventContainsPatternAndEndsWithPatternTest.java

    r1170 r1205  
    2525 
    2626import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    28 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     28import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2929import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    3030 
     
    6161                      "}"; 
    6262        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    63         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    64         UsagePattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    65         UsagePattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
    66         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(endsWithPattern).build(); 
     63        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     64        InteractionPattern containedPattern = builder.concernedNode(SELECTION).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     65        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
     66        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(containedPattern).endsWith(endsWithPattern).build(); 
    6767        // When 
    6868        boolean patternContained = pattern.containedIn(taskTree); 
     
    9191                      "}"; 
    9292        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    93         UsagePatternBuilder builder = new UsagePatternBuilder(); 
    94         UsagePattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
    95         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
     93        InteractionPatternBuilder builder = new InteractionPatternBuilder(); 
     94        InteractionPattern endsWithPattern = builder.concernedNode(ITERATION).startsWith(MOUSE_CLICK).build(); 
     95        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
    9696        // When 
    9797        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithEventTest.java

    r1170 r1205  
    2222 
    2323import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    24 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    25 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     24import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     25import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2626import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2727 
     
    5050                      "}"; 
    5151        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    52         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).build(); 
     52        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).build(); 
    5353        // When 
    5454        boolean patternContained = pattern.containedIn(taskTree); 
     
    7171                      "}"; 
    7272        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    73         UsagePattern pattern = new UsagePatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).build(); 
     73        InteractionPattern pattern = new InteractionPatternBuilder().concernedNode(SEQUENCE).startsWith(TEXT_INPUT).build(); 
    7474        // When 
    7575        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsEventTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    5454                      "}"; 
    5555        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    56         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    57         UsagePattern startsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(TEXT_INPUT).build(); 
    58         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).build(); 
     56        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     57        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(TEXT_INPUT).build(); 
     58        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).build(); 
    5959        // When 
    6060        boolean patternContained = pattern.containedIn(taskTree); 
     
    7979                      "}"; 
    8080        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    81         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    82         UsagePattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 
    83         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).build(); 
     81        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     82        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(TEXT_INPUT).build(); 
     83        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).build(); 
    8484        // When 
    8585        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndContainsPatternTest.java

    r1170 r1205  
    2525 
    2626import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    28 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     28import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2929import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    3030 
     
    6262                      "}"; 
    6363        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    64         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    65         UsagePattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
    66         UsagePattern containedPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    67         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).build(); 
     64        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     65        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
     66        InteractionPattern containedPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     67        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containedPattern).build(); 
    6868        // When 
    6969        boolean patternContained = pattern.containedIn(taskTree); 
     
    9696                      "}"; 
    9797        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    98         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    99         UsagePattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
    100         UsagePattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    101         UsagePattern pattern = patternBuilder.concernedNode(ITERATION).startsWith(endsWithPattern).endsWith(startsWithPattern).build(); 
     98        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     99        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).contains(MOUSE_CLICK).build(); 
     100        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     101        InteractionPattern pattern = patternBuilder.concernedNode(ITERATION).startsWith(endsWithPattern).endsWith(startsWithPattern).build(); 
    102102        // When 
    103103        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternAndEndsWithEventTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    5959                      "}"; 
    6060        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    61         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    62         UsagePattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    63         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(TEXT_INPUT).build(); 
     61        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     62        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     63        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(TEXT_INPUT).build(); 
    6464        // When 
    6565        boolean patternContained = pattern.containedIn(taskTree); 
     
    9090                      "}"; 
    9191        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    92         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    93         UsagePattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    94         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(TEXT_INPUT).build(); 
     92        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     93        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     94        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).endsWith(TEXT_INPUT).build(); 
    9595        // When 
    9696        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithEventTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    4444                      "    Selection sel1 {" + 
    4545                      "      Sequence seq2 {" + 
    46                       "        TextInput target4 {}" + 
     46                      "        TextInput target1 {}" + 
    4747                      "        MouseClick target2 {}" + 
    4848                      "      }" + 
     
    5050                      "    Selection sel1 {" + 
    5151                      "      Sequence seq3 {" + 
    52                       "        TextInput target4 {}" + 
    53                       "        EventTask target2 {}" + 
     52                      "        TextInput target3 {}" + 
     53                      "        EventTask target4 {}" + 
    5454                      "      }" + 
    5555                      "    }" + 
    56                       "    MouseClick target2 {}" + 
    57                       "    TextInput target3 {}" + 
     56                      "    MouseClick target5 {}" + 
     57                      "    TextInput target6 {}" + 
    5858                      "  }" + 
    5959                      "}"; 
    6060        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    61         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    62         UsagePattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    63         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     61        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     62        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     63        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    6464        // When 
    6565        boolean patternContained = pattern.containedIn(taskTree); 
     
    9090                      "}"; 
    9191        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    92         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    93         UsagePattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    94         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     92        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     93        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     94        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    9595        // When 
    9696        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsEventAndEndsWithPatternTest.java

    r1170 r1205  
    1616 
    1717import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.MOUSE_CLICK; 
     18import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.SCROLL; 
    1819import static de.ugoe.cs.autoquest.usability.tasktree.filters.EventTypeFilter.TEXT_INPUT; 
    1920import static de.ugoe.cs.autoquest.usability.tasktree.filters.TaskTypeFilter.SELECTION; 
     
    2425 
    2526import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     28import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2829import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2930 
     
    5455                      "      }" + 
    5556                      "    }" + 
    56                       "  }" + 
    57                       "  MouseClick target2 {}" + 
    58                       "  TextInput target3 {}" + 
    59                       "  Selection sel2 {" + 
    60                       "    Sequence seq4 {" + 
    61                       "      TextInput target4 {}" + 
    62                       "      MouseClick target2 {}" + 
     57                      "    MouseClick target2 {}" + 
     58                      "    TextInput target3 {}" + 
     59                      "    Selection sel2 {" + 
     60                      "      Sequence seq5 {" + 
     61                      "        TextInput target4 {}" + 
     62                      "        MouseClick target2 {}" + 
     63                      "      }" + 
    6364                      "    }" + 
    64                       "  }" + 
    65                       "  Selection sel2 {" + 
    66                       "    Sequence seq5 {" + 
    67                       "      TextInput target4 {}" + 
    68                       "      EventTask target2 {}" + 
     65                      "    Selection sel2 {" + 
     66                      "      Sequence seq6 {" + 
     67                      "        TextInput target4 {}" + 
     68                      "        EventTask target2 {}" + 
     69                      "      }" + 
    6970                      "    }" + 
    7071                      "  }" + 
    7172                      "}"; 
    7273        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    73         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    74         UsagePattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    75         UsagePattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    76         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
     74        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     75        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     76        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     77        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
    7778        // When 
    7879        boolean patternContained = pattern.containedIn(taskTree); 
     
    8990                      "      Sequence seq2 {" + 
    9091                      "        TextInput target4 {}" + 
    91                       "        MouseClick target2 {}" + 
     92                      "        MouseClick target3 {}" + 
    9293                      "      }" + 
    9394                      "    }" + 
     
    9899                      "      }" + 
    99100                      "    }" + 
    100                       "  }" + 
    101                       "  EventTask target2 {}" + 
    102                       "  TextInput target3 {}" + 
    103                       "  Selection sel2 {" + 
    104                       "    Sequence seq4 {" + 
    105                       "      TextInput target4 {}" + 
    106                       "      MouseClick target2 {}" + 
     101                      "    EventTask target2 {}" + 
     102                      "    TextInput target1 {}" + 
     103                      "    Selection sel2 {" + 
     104                      "      Sequence seq5 {" + 
     105                      "        TextInput target4 {}" + 
     106                      "        MouseClick target3 {}" + 
     107                      "      }" + 
    107108                      "    }" + 
    108                       "  }" + 
    109                       "  Selection sel2 {" + 
    110                       "    Sequence seq5 {" + 
    111                       "      TextInput target4 {}" + 
    112                       "      EventTask target2 {}" + 
     109                      "    Selection sel2 {" + 
     110                      "      Sequence seq6 {" + 
     111                      "        TextInput target4 {}" + 
     112                      "        EventTask target2 {}" + 
     113                      "      }" + 
    113114                      "    }" + 
    114115                      "  }" + 
    115116                      "}"; 
    116117        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    117         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    118         UsagePattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    119         UsagePattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    120         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(MOUSE_CLICK).endsWith(endsWithPattern).build(); 
     118        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     119        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     120        InteractionPattern endsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     121        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(SCROLL).endsWith(endsWithPattern).build(); 
    121122        // When 
    122123        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternContainsPatternAndEndsWithEventTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    4545                      "      Sequence seq2 {" + 
    4646                      "        TextInput target4 {}" + 
    47                       "        MouseClick target2 {}" + 
     47                      "        MouseClick target1 {}" + 
    4848                      "      }" + 
    4949                      "    }" + 
    5050                      "    Selection sel1 {" + 
    5151                      "      Sequence seq3 {" + 
    52                       "        TextInput target4 {}" + 
    53                       "        EventTask target2 {}" + 
     52                      "        TextInput target3 {}" + 
     53                      "        EventTask target5 {}" + 
    5454                      "      }" + 
    5555                      "    }" + 
     56                      "    Sequence seq4 {" + 
     57                      "      MouseClick target6 {}" + 
     58                      "      EventTask t5 {}" + 
     59                      "    }" + 
     60                      "    TextInput target7 {}" + 
    5661                      "  }" + 
    57                       "  Sequence seq4 {" + 
    58                       "    MouseClick target2 {}" + 
    59                       "    EventTask t5 {}" + 
    60                       "  }" + 
    61                       "  TextInput target3 {}" + 
    6262                      "}"; 
    6363        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    64         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    65         UsagePattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    66         UsagePattern containsPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).build(); 
    67         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containsPattern).endsWith(TEXT_INPUT).build(); 
     64        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     65        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     66        InteractionPattern containsPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).build(); 
     67        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containsPattern).endsWith(TEXT_INPUT).build(); 
    6868        // When 
    6969        boolean patternContained = pattern.containedIn(taskTree); 
     
    9797                      "}"; 
    9898        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    99         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    100         UsagePattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
    101         UsagePattern containsPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    102         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containsPattern).endsWith(TEXT_INPUT).build(); 
     99        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     100        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SELECTION).startsWith(TEXT_INPUT).endsWith(MOUSE_CLICK).build(); 
     101        InteractionPattern containsPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     102        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).contains(containsPattern).endsWith(TEXT_INPUT).build(); 
    103103        // When 
    104104        boolean patternContained = pattern.containedIn(taskTree); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/patterns/visitors/startswith/StartsWithPatternTest.java

    r1170 r1205  
    2424 
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    26 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePattern; 
    27 import de.ugoe.cs.autoquest.usability.rules.patterns.UsagePatternBuilder; 
     26import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPattern; 
     27import de.ugoe.cs.autoquest.usability.rules.patterns.InteractionPatternBuilder; 
    2828import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    2929 
     
    5757                      "}"; 
    5858        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    59         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    60         UsagePattern startsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build(); 
    61         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).build(); 
     59        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     60        InteractionPattern startsWithPattern = patternBuilder.concernedNode(ITERATION).startsWith(TEXT_INPUT).contains(MOUSE_CLICK).build(); 
     61        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).build(); 
    6262        // When 
    6363        boolean patternContained = pattern.containedIn(taskTree); 
     
    8686                      "}"; 
    8787        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    88         UsagePatternBuilder patternBuilder = new UsagePatternBuilder(); 
    89         UsagePattern startsWithPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
    90         UsagePattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).build(); 
     88        InteractionPatternBuilder patternBuilder = new InteractionPatternBuilder(); 
     89        InteractionPattern startsWithPattern = patternBuilder.concernedNode(SEQUENCE).startsWith(MOUSE_CLICK).endsWith(TEXT_INPUT).build(); 
     90        InteractionPattern pattern = patternBuilder.concernedNode(SEQUENCE).startsWith(startsWithPattern).build(); 
    9191        // When 
    9292        boolean patternContained = pattern.containedIn(taskTree); 
Note: See TracChangeset for help on using the changeset viewer.