Ignore:
Timestamp:
04/20/13 21:33:32 (11 years ago)
Author:
adeicke
Message:

Fixed test cases.

Location:
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitTextInputsEvaluatorTest.java

    r1151 r1171  
    2727import com.google.common.base.Optional; 
    2828 
    29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     29import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    3030import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
    31 import de.ugoe.cs.autoquest.usability.rules.metrics.NoLetterOrDigitRatioMetric; 
     31import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    3232 
    3333/** 
     
    3838 * @author Alexander Deicke 
    3939 */ 
    40 public class NoLetterOrDigitTextInputsEvaluatorTest extends AbstractUsabilityEvaluationTC { 
     40public class NoLetterOrDigitTextInputsEvaluatorTest { 
    4141 
    4242    @Test 
     
    4646                      "  TextInput () {}" +  
    4747                      "}"; 
    48         ITaskTree taskTree = createTaskTree(spec); 
     48        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    4949        // When 
    5050        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
     
    6161                         "12345678901234567890123456789012345) {}" +  
    6262            "}"; 
    63         ITaskTree taskTree = createTaskTree(spec); 
     63        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    6464        // When 
    6565        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
     
    7575            "  TextInput (123456789012345678901234567890_123456789012345) {}" +  
    7676            "}"; 
    77         ITaskTree taskTree = createTaskTree(spec); 
     77        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    7878        // When 
    7979        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
     
    8888                      "  TextInput (12345_6789012345) {}" +  
    8989                      "}"; 
    90         ITaskTree taskTree = createTaskTree(spec); 
     90        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    9191        // When 
    9292        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
     
    101101                      "  TextInput (_a_b_c_) {}" + 
    102102                      "}"; 
    103         ITaskTree taskTree = createTaskTree(spec); 
     103        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    104104        // When 
    105105        Optional<UsabilityDefect> recommendation = new NoLetterOrDigitRatioMetric(taskTree).calculate(); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsEvaluatorTest.java

    r1151 r1171  
    2727import com.google.common.base.Optional; 
    2828 
    29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     29import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    3030import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
    31 import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputEntryRepetitionsMetric; 
     31import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    3232 
    3333/** 
     
    3838 * @author Alexander Deicke 
    3939 */ 
    40 public class TextInputEntryRepetitionsEvaluatorTest extends AbstractUsabilityEvaluationTC { 
     40public class TextInputEntryRepetitionsEvaluatorTest { 
    4141 
    4242    @Test 
     
    4444        // Given 
    4545        String spec = "Sequence {" + "  TextInput () {}" + "}"; 
    46         ITaskTree taskTree = createTaskTree(spec); 
     46        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    4747        // When 
    4848        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
     
    5757            "Sequence {" + "  TextInput (a b c) {}" + "  Sequence {" + "    TextInput (a) {}" 
    5858                + "    TextInput (d) {}" + "    TextInput (e) {}" + "  }" + "}"; 
    59         ITaskTree taskTree = createTaskTree(spec); 
     59        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    6060        // When 
    6161        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
     
    7070            "Sequence {" + "  TextInput (a b c) {}" + "  Sequence {" + "    TextInput (a) {}" 
    7171                + "    TextInput (b) {}" + "    TextInput (c) {}" + "  }" + "}"; 
    72         ITaskTree taskTree = createTaskTree(spec); 
     72        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    7373        // When 
    7474        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
     
    8989                + "      TextInput (b) {}" + "      TextInput (c) {}" + "      TextInput (d) {}" 
    9090                + "      TextInput (e) {}" + "    }" + "  }" + "  TextInput (f) {}" + "}"; 
    91         ITaskTree taskTree = createTaskTree(spec); 
     91        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    9292        // When 
    9393        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
     
    108108                + "      TextInput (b b b a) {}" + "      TextInput (a a c c) {}" 
    109109                + "      TextInput (b b a) {}" + "    }" + "  }" + "  TextInput (d) {}" + "}"; 
    110         ITaskTree taskTree = createTaskTree(spec); 
     110        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    111111        // When 
    112112        Optional<UsabilityDefect> recommendation = new TextInputEntryRepetitionsMetric(taskTree).calculate(); 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioEvaluatorTest.java

    r1151 r1171  
    2727import com.google.common.base.Optional; 
    2828 
    29 import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     29import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskModel; 
    3030import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
    31 import de.ugoe.cs.autoquest.usability.rules.metrics.TextInputRatioMetric; 
     31import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskModelUtil; 
    3232 
    3333/** 
     
    3838 * @author Alexander Deicke 
    3939 */ 
    40 public class TextInputRatioEvaluatorTest extends AbstractUsabilityEvaluationTC { 
     40public class TextInputRatioEvaluatorTest { 
    4141 
    4242    @Test 
     
    4747                + "  Interaction {}" + "  TextInput (c) {}" + "  Interaction {}" 
    4848                + "  Interaction {}" + "  Interaction {}" + "}"; 
    49         ITaskTree taskTree = createTaskTree(spec); 
     49        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    5050        // When 
    5151        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
     
    6060            "Sequence {" + "  Interaction {}" + "  TextInput (a) {}" + "  Interaction {}" 
    6161                + "  Interaction {}" + "  TextInput (c) {}" + "}"; 
    62         ITaskTree taskTree = createTaskTree(spec); 
     62        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    6363        // When 
    6464        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
     
    7373            "Sequence {" + "  Interaction {}" + "  TextInput (a) {}" + "  TextInput (b) {}" 
    7474                + "  Interaction {}" + "  TextInput (c) {}" + "}"; 
    75         ITaskTree taskTree = createTaskTree(spec); 
     75        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    7676        // When 
    7777        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
     
    8686            "Sequence {" + "  TextInput (a) {}" + "  TextInput (b) {}" + "  Interaction {}" 
    8787                + "  TextInput (c) {}" + "}"; 
    88         ITaskTree taskTree = createTaskTree(spec); 
     88        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    8989        // When 
    9090        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
     
    9797        // Given 
    9898        String spec = "TextInput (bla) {}"; 
    99         ITaskTree taskTree = createTaskTree(spec); 
     99        ITaskModel taskTree = GenerateTaskModelUtil.getTaskModelFromSpec(spec); 
    100100        // When 
    101101        Optional<UsabilityDefect> recommendation = new TextInputRatioMetric(taskTree).calculate(); 
Note: See TracChangeset for help on using the changeset viewer.