[1109] | 1 | // Copyright 2012 Georg-August-Universität Göttingen, Germany |
---|
| 2 | // |
---|
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
---|
| 4 | // you may not use this file except in compliance with the License. |
---|
| 5 | // You may obtain a copy of the License at |
---|
| 6 | // |
---|
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
---|
| 8 | // |
---|
| 9 | // Unless required by applicable law or agreed to in writing, software |
---|
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
---|
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
| 12 | // See the License for the specific language governing permissions and |
---|
| 13 | // limitations under the License. |
---|
| 14 | |
---|
| 15 | package de.ugoe.cs.autoquest.tasktrees.temporalrelation; |
---|
| 16 | |
---|
| 17 | import org.junit.Test; |
---|
| 18 | |
---|
| 19 | /** |
---|
[1402] | 20 | * @author Patrick Harms |
---|
[1109] | 21 | */ |
---|
[1650] | 22 | public class SequenceForTaskDetectionRuleAlignmentTest extends AbstractTemporalRelationshipTC { |
---|
[1109] | 23 | |
---|
| 24 | /** |
---|
| 25 | * |
---|
| 26 | */ |
---|
| 27 | @Test |
---|
[1146] | 28 | public void test_TaskDetection_01() throws Exception { |
---|
| 29 | String input = |
---|
| 30 | "UserSession {" + |
---|
| 31 | " Event noise0 {}" + |
---|
| 32 | " Event action1 {}" + |
---|
| 33 | " Event action2 {}" + |
---|
| 34 | " Event action3 {}" + |
---|
| 35 | " Event action4 {}" + |
---|
| 36 | " Event noise1 {}" + |
---|
| 37 | " Event noise2 {}" + |
---|
| 38 | " Event action1 {}" + |
---|
| 39 | " Event action2 {}" + |
---|
| 40 | " Event action3 {}" + |
---|
| 41 | " Event action4 {}" + |
---|
| 42 | " Event noise3 {}" + |
---|
| 43 | " Event noise4 {}" + |
---|
| 44 | " Event noise5 {}" + |
---|
| 45 | " Event noise6 {}" + |
---|
| 46 | " Event action1 {}" + |
---|
| 47 | " Event action2 {}" + |
---|
| 48 | " Event action3 {}" + |
---|
| 49 | " Event action4 {}" + |
---|
| 50 | " Event action1 {}" + |
---|
| 51 | " Event action2 {}" + |
---|
| 52 | " Event action3 {}" + |
---|
| 53 | " Event action4 {}" + |
---|
| 54 | " Event noise7 {}" + |
---|
| 55 | "}"; |
---|
[1109] | 56 | |
---|
[1146] | 57 | String output = |
---|
| 58 | "UserSession {" + |
---|
| 59 | " Event noise0 {}" + |
---|
| 60 | " Iteration iteration1 {" + |
---|
| 61 | " Sequence sequence1 {" + |
---|
| 62 | " Event action1 {}" + |
---|
| 63 | " Event action2 {}" + |
---|
| 64 | " Event action3 {}" + |
---|
| 65 | " Event action4 {}" + |
---|
| 66 | " }" + |
---|
| 67 | " }" + |
---|
| 68 | " Event noise1 {}" + |
---|
| 69 | " Event noise2 {}" + |
---|
| 70 | " Iteration iteration1 {" + |
---|
| 71 | " Sequence sequence1 {" + |
---|
| 72 | " Event action1 {}" + |
---|
| 73 | " Event action2 {}" + |
---|
| 74 | " Event action3 {}" + |
---|
| 75 | " Event action4 {}" + |
---|
| 76 | " }" + |
---|
| 77 | " }" + |
---|
| 78 | " Event noise3 {}" + |
---|
| 79 | " Event noise4 {}" + |
---|
| 80 | " Event noise5 {}" + |
---|
| 81 | " Event noise6 {}" + |
---|
| 82 | " Iteration iteration1 {" + |
---|
| 83 | " Sequence sequence1 {" + |
---|
| 84 | " Event action1 {}" + |
---|
| 85 | " Event action2 {}" + |
---|
| 86 | " Event action3 {}" + |
---|
| 87 | " Event action4 {}" + |
---|
| 88 | " }" + |
---|
| 89 | " Sequence sequence1 {" + |
---|
| 90 | " Event action1 {}" + |
---|
| 91 | " Event action2 {}" + |
---|
| 92 | " Event action3 {}" + |
---|
| 93 | " Event action4 {}" + |
---|
| 94 | " }" + |
---|
| 95 | " }" + |
---|
| 96 | " Event noise7 {}" + |
---|
| 97 | "}"; |
---|
| 98 | |
---|
[1654] | 99 | applySessionScopeRule(SequenceForTaskDetectionRuleAlignment.class, input, output); |
---|
[1109] | 100 | } |
---|
| 101 | |
---|
[1146] | 102 | /** |
---|
| 103 | * |
---|
| 104 | */ |
---|
| 105 | @Test |
---|
| 106 | public void test_TaskDetection_02() throws Exception { |
---|
| 107 | String input = |
---|
| 108 | "UserSession {" + |
---|
| 109 | " Event noise0 {}" + |
---|
| 110 | " Event action1 {}" + |
---|
| 111 | " Event action2 {}" + |
---|
| 112 | " Event noise1 {}" + |
---|
| 113 | " Event noise2 {}" + |
---|
| 114 | " Event action3 {}" + |
---|
| 115 | " Event action1 {}" + |
---|
| 116 | " Event action2 {}" + |
---|
| 117 | " Event action4 {}" + |
---|
| 118 | " Event noise3 {}" + |
---|
| 119 | " Event noise4 {}" + |
---|
| 120 | " Event noise5 {}" + |
---|
| 121 | " Event noise6 {}" + |
---|
| 122 | " Event action1 {}" + |
---|
| 123 | " Event action2 {}" + |
---|
| 124 | " Event action3 {}" + |
---|
| 125 | " Event action4 {}" + |
---|
| 126 | " Event action1 {}" + |
---|
| 127 | " Event action2 {}" + |
---|
| 128 | " Event action3 {}" + |
---|
| 129 | " Event action4 {}" + |
---|
| 130 | " Event noise7 {}" + |
---|
| 131 | "}"; |
---|
| 132 | |
---|
| 133 | String output = |
---|
| 134 | "UserSession {" + |
---|
| 135 | " Event noise0 {}" + |
---|
| 136 | " Sequence sequence1 {" + |
---|
| 137 | " Event action1 {}" + |
---|
| 138 | " Event action2 {}" + |
---|
| 139 | " }" + |
---|
| 140 | " Event noise1 {}" + |
---|
| 141 | " Event noise2 {}" + |
---|
| 142 | " Event action3 {}" + |
---|
| 143 | " Sequence sequence1 {" + |
---|
| 144 | " Event action1 {}" + |
---|
| 145 | " Event action2 {}" + |
---|
| 146 | " }" + |
---|
| 147 | " Event action4 {}" + |
---|
| 148 | " Event noise3 {}" + |
---|
| 149 | " Event noise4 {}" + |
---|
| 150 | " Event noise5 {}" + |
---|
| 151 | " Event noise6 {}" + |
---|
| 152 | " Iteration iteration1 {" + |
---|
| 153 | " Sequence sequence3 {" + |
---|
| 154 | " Sequence sequence1 {" + |
---|
| 155 | " Event action1 {}" + |
---|
| 156 | " Event action2 {}" + |
---|
| 157 | " }" + |
---|
| 158 | " Event action3 {}" + |
---|
| 159 | " Event action4 {}" + |
---|
| 160 | " }" + |
---|
| 161 | " Sequence sequence3 {" + |
---|
| 162 | " Sequence sequence1 {" + |
---|
| 163 | " Event action1 {}" + |
---|
| 164 | " Event action2 {}" + |
---|
| 165 | " }" + |
---|
| 166 | " Event action3 {}" + |
---|
| 167 | " Event action4 {}" + |
---|
| 168 | " }" + |
---|
| 169 | " }" + |
---|
| 170 | " Event noise7 {}" + |
---|
| 171 | "}"; |
---|
| 172 | |
---|
[1654] | 173 | applySessionScopeRule(SequenceForTaskDetectionRuleAlignment.class, input, output); |
---|
[1146] | 174 | } |
---|
| 175 | |
---|
[1109] | 176 | } |
---|