Ignore:
Timestamp:
01/16/13 17:51:51 (12 years ago)
Author:
adeicke
Message:
  • Removed lombok related annotations and util class
  • Added comments and formating due to match project defaults
Location:
trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability
Files:
17 edited

Legend:

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

    r1030 r1040  
     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. 
    114 
    215package de.ugoe.cs.autoquest.usability; 
     
    1225import de.ugoe.cs.autoquest.usability.evaluation.rule.set.RulesetFactoryTest; 
    1326 
     27/** 
     28 * <p> 
     29 * TODO comment 
     30 * </p> 
     31 *  
     32 * @author Alexander Deicke 
     33 */ 
    1434@RunWith(Suite.class) 
    1535@SuiteClasses( 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluationFacadeTest.java

    r1030 r1040  
     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 
    115package de.ugoe.cs.autoquest.usability; 
    216 
     
    1125import de.ugoe.cs.autoquest.usability.testutil.TaskTreeBuilder; 
    1226 
     27/** 
     28 * <p> 
     29 * TODO comment 
     30 * </p> 
     31 *  
     32 * @author Alexander Deicke 
     33 */ 
    1334public class UsabilityEvaluationFacadeTest { 
    1435 
     
    1738        UsabilityEvaluationFacade.applyUsabilityRuleset(null); 
    1839    } 
    19      
     40 
    2041    @Test 
    2142    public void apply_empty_ruleset_should_return_execute_usability_evaluation_step() { 
    22         ExecuteUsabilityEvaluationStep executeUsabilityEvaluationStep =  
    23                 UsabilityEvaluationFacade.applyUsabilityRuleset(emptyUsabilityRuleset()); 
    24         assertThat(executeUsabilityEvaluationStep).isInstanceOf(ExecuteUsabilityEvaluationStep.class); 
     43        ExecuteUsabilityEvaluationStep executeUsabilityEvaluationStep = 
     44            UsabilityEvaluationFacade.applyUsabilityRuleset(emptyUsabilityRuleset()); 
     45        assertThat(executeUsabilityEvaluationStep) 
     46            .isInstanceOf(ExecuteUsabilityEvaluationStep.class); 
    2547    } 
    26      
     48 
    2749    @Test(expected = NullPointerException.class) 
    2850    public void evaluate_usability_of_null_should_throw_exception() { 
    29         UsabilityEvaluationFacade.applyUsabilityRuleset(emptyUsabilityRuleset()).evaluateUsabilityOf(null); 
     51        UsabilityEvaluationFacade.applyUsabilityRuleset(emptyUsabilityRuleset()) 
     52            .evaluateUsabilityOf(null); 
    3053    } 
    31      
     54 
    3255    @Test 
    33     public void evaluate_usability_of_task_tree_against_empty_ruleset_should_return_empty_evaluation_report() { 
    34         ITaskTree taskTree =  TaskTreeBuilder.builder().root("Ich bin eine Wurzel").creatTaskTree(); 
    35         UsabilityEvaluationReport evaluationReport =  
    36                 UsabilityEvaluationFacade.applyUsabilityRuleset(emptyUsabilityRuleset()).evaluateUsabilityOf(taskTree); 
    37         assertThat(evaluationReport).isNotNull(); 
     56    public void evaluate_usability_of_task_tree_against_empty_ruleset_should_return_empty_evaluation_report() 
     57    { 
     58        ITaskTree taskTree = TaskTreeBuilder.builder().root("Ich bin eine Wurzel").creatTaskTree(); 
     59        UsabilityEvaluationReport evaluationReport = 
     60            UsabilityEvaluationFacade.applyUsabilityRuleset(emptyUsabilityRuleset()) 
     61                .evaluateUsabilityOf(taskTree); 
     62        assertThat(evaluationReport).isNotNull(); 
    3863    } 
    39      
     64 
    4065    @Test 
    41     public void evaluate_usability_of_task_tree_against_dummy_ruleset_should_return_non_empty_evaluation_report() { 
    42         ITaskTree taskTree =  TaskTreeBuilder.builder().root("Ich bin eine Wurzel").creatTaskTree(); 
    43         UsabilityEvaluationReport evaluationReport =  
    44                 UsabilityEvaluationFacade.applyUsabilityRuleset(new DummyUsabilityRuleset()).evaluateUsabilityOf(taskTree); 
     66    public void evaluate_usability_of_task_tree_against_dummy_ruleset_should_return_non_empty_evaluation_report() 
     67    { 
     68        ITaskTree taskTree = TaskTreeBuilder.builder().root("Ich bin eine Wurzel").creatTaskTree(); 
     69        UsabilityEvaluationReport evaluationReport = 
     70            UsabilityEvaluationFacade.applyUsabilityRuleset(new DummyUsabilityRuleset()) 
     71                .evaluateUsabilityOf(taskTree); 
    4572        assertThat(evaluationReport).isNotNull(); 
    4673    } 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluationReportTest.java

    r1034 r1040  
     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. 
    114 
    215package de.ugoe.cs.autoquest.usability; 
     
    1831import de.ugoe.cs.autoquest.usability.testutil.DummyUsabilityRuleset; 
    1932 
     33/** 
     34 * <p> 
     35 * TODO comment 
     36 * </p> 
     37 *  
     38 * @author Alexander Deicke 
     39 */ 
    2040public class UsabilityEvaluationReportTest { 
    2141 
     
    2848    public void usability_report_from_empty_list_has_no_recommendations() { 
    2949        UsabilityEvaluationReport evaluationReport = 
    30             UsabilityEvaluationReport.from(Collections 
    31                 .<UsabilityDefect> emptyList()); 
     50            UsabilityEvaluationReport.from(Collections.<UsabilityDefect> emptyList()); 
    3251        assertThat(evaluationReport).isNotNull().has(noUsabilityGuidlineRecommendations()); 
    3352    } 
     
    3655    public void usability_report_from_non_empty_list_has_recommendations() { 
    3756        List<UsabilityDefect> guidlineRecommendations = 
    38             Lists.newArrayList(new UsabilityDefectFactory(new DummyUsabilityGuidlineDescriptionResolver()) 
     57            Lists 
     58                .newArrayList(new UsabilityDefectFactory( 
     59                                                         new DummyUsabilityGuidlineDescriptionResolver()) 
    3960                    .createUsabilityGuidlineRecommendation(UsabilityDefectSeverityLevel.INFO, 
    4061                                                           new DummyUsabilityRuleset() 
    41                                                                .evaluationRules() 
    42                                                                .iterator().next(), 
     62                                                               .evaluationRules().iterator().next(), 
    4363                                                           Collections.<String, String> emptyMap())); 
    4464        UsabilityEvaluationReport evaluationReport = 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/AbstractUsabilityEvaluationTC.java

    r1030 r1040  
    8888     * @param evaluateUsability 
    8989     */ 
    90     protected void assertUsabilityEvaluationResult(UsabilityDefect[]         expectedDefects, 
     90    protected void assertUsabilityEvaluationResult(UsabilityDefect[] expectedDefects, 
    9191                                                   UsabilityEvaluationResult evaluationResult) 
    9292    { 
    9393        assertEquals(expectedDefects.length, evaluationResult.getAllDefects().size()); 
    9494 
    95         EXPECTED_DEFECT_ITERATION: 
    96         for (UsabilityDefect expectedDefect : expectedDefects) { 
     95        EXPECTED_DEFECT_ITERATION: for (UsabilityDefect expectedDefect : expectedDefects) { 
    9796            for (UsabilityDefect defect : evaluationResult.getAllDefects()) { 
    9897                if (expectedDefect.equals(defect)) { 
     
    167166 
    168167        if ("Interaction".equals(type)) { 
    169             return taskTreeNodeFactory.createNewEventTask 
    170                 (new DummyInteraction("dummy", typeNumbers[0]++), new DummyGUIElement("dummy")); 
     168            return taskTreeNodeFactory.createNewEventTask(new DummyInteraction("dummy", 
     169                                                                               typeNumbers[0]++), 
     170                                                          new DummyGUIElement("dummy")); 
    171171        } 
    172172        else if ("Sequence".equals(type)) { 
     
    185185 
    186186            TextInput textInput = new TextInput(additionalInfo, new ArrayList<Event>()); 
    187              
    188             IEventTask task = taskTreeNodeFactory.createNewEventTask 
    189                 (textInput, new DummyTextField(additionalInfo)); 
     187 
     188            IEventTask task = 
     189                taskTreeNodeFactory.createNewEventTask(textInput, 
     190                                                       new DummyTextField(additionalInfo)); 
    190191 
    191192            return task; 
     
    220221        else { 
    221222            fail("can not add children to parent task tree node of type " + 
    222                  parent.getClass().getName()); 
     223                parent.getClass().getName()); 
    223224        } 
    224225    } 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/NoLetterOrDigitTextInputsEvaluatorTest.java

    r1034 r1040  
     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. 
    114 
    215package de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator; 
     
    2639import de.ugoe.cs.autoquest.usability.tasktree.filter.FilterStatisticCache; 
    2740 
     41/** 
     42 * <p> 
     43 * TODO comment 
     44 * </p> 
     45 *  
     46 * @author Alexander Deicke 
     47 */ 
    2848public class NoLetterOrDigitTextInputsEvaluatorTest extends AbstractUsabilityEvaluationTC { 
    2949 
     
    3252    @Before 
    3353    public void initRuleUnderTest() { 
    34         EnumSet<? extends UsabilityRule> ruleset = 
    35             textInputUsabiliyRuleset().evaluationRules(); 
     54        EnumSet<? extends UsabilityRule> ruleset = textInputUsabiliyRuleset().evaluationRules(); 
    3655        this.ruleUnderTest = Iterables.find(ruleset, new Predicate<UsabilityRule>() { 
    3756 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/TextInputEntryRepetitionsEvaluatorTest.java

    r1034 r1040  
     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. 
    114 
    215package de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator; 
     
    2639import de.ugoe.cs.autoquest.usability.tasktree.filter.FilterStatisticCache; 
    2740 
     41/** 
     42 * <p> 
     43 * TODO comment 
     44 * </p> 
     45 *  
     46 * @author Alexander Deicke 
     47 */ 
    2848public class TextInputEntryRepetitionsEvaluatorTest extends AbstractUsabilityEvaluationTC { 
    2949 
     
    3252    @Before 
    3353    public void initRuleUnderTest() { 
    34         EnumSet<? extends UsabilityRule> ruleset = 
    35             textInputUsabiliyRuleset().evaluationRules(); 
     54        EnumSet<? extends UsabilityRule> ruleset = textInputUsabiliyRuleset().evaluationRules(); 
    3655        this.ruleUnderTest = Iterables.find(ruleset, new Predicate<UsabilityRule>() { 
    3756 
     
    85104            new TextInputEntryRepetitionsEvaluator(this.ruleUnderTest, taskTree).evaluationResult(); 
    86105        // Then 
    87         assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel());    } 
     106        assertThat(recommendation).is(present()).has(lowRecommendationSeverityLevel()); 
     107    } 
    88108 
    89109    @Test 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/evaluator/TextInputRatioEvaluatorTest.java

    r1034 r1040  
     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. 
    114 
    215package de.ugoe.cs.autoquest.usability.evaluation.rule.evaluator; 
     
    2639import de.ugoe.cs.autoquest.usability.tasktree.filter.FilterStatisticCache; 
    2740 
     41/** 
     42 * <p> 
     43 * TODO comment 
     44 * </p> 
     45 *  
     46 * @author Alexander Deicke 
     47 */ 
    2848public class TextInputRatioEvaluatorTest extends AbstractUsabilityEvaluationTC { 
    2949 
     
    3252    @Before 
    3353    public void initRuleUnderTest() { 
    34         EnumSet<? extends UsabilityRule> ruleset = 
    35             textInputUsabiliyRuleset().evaluationRules(); 
     54        EnumSet<? extends UsabilityRule> ruleset = textInputUsabiliyRuleset().evaluationRules(); 
    3655        this.ruleUnderTest = Iterables.find(ruleset, new Predicate<UsabilityRule>() { 
    3756 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/set/EmptyUsabilityRulesetTest.java

    r1030 r1040  
     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 
    115package de.ugoe.cs.autoquest.usability.evaluation.rule.set; 
    216 
     
    620import org.junit.Test; 
    721 
     22/** 
     23 * <p> 
     24 * TODO comment 
     25 * </p> 
     26 *  
     27 * @author Alexander Deicke 
     28 */ 
    829public class EmptyUsabilityRulesetTest { 
    930 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/evaluation/rule/set/RulesetFactoryTest.java

    r1030 r1040  
     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 
    115package de.ugoe.cs.autoquest.usability.evaluation.rule.set; 
    216 
     
    1024import org.junit.Test; 
    1125 
     26/** 
     27 * <p> 
     28 * TODO comment 
     29 * </p> 
     30 *  
     31 * @author Alexander Deicke 
     32 */ 
    1233public class RulesetFactoryTest { 
    13      
     34 
    1435    @Test 
    1536    public void empty_ruleset_factory_method_should_return_empty_ruleset() { 
    16         UsabilityRuleset ruleset = emptyUsabilityRuleset(); 
    17         assertThat(ruleset).isInstanceOf(EmptyUsabilityRuleset.class).has(noUsabilityRules()); 
     37        UsabilityRuleset ruleset = emptyUsabilityRuleset(); 
     38        assertThat(ruleset).isInstanceOf(EmptyUsabilityRuleset.class).has(noUsabilityRules()); 
    1839    } 
    19      
     40 
    2041    @Test 
    2142    public void text_input_ruleset_factory_method_should_return_text_input_ruleset() { 
    22         UsabilityRuleset ruleset = textInputUsabiliyRuleset(); 
    23         assertThat(ruleset).isInstanceOf(TextInputUsabiliyRuleset.class).has(usabilityRules()); 
     43        UsabilityRuleset ruleset = textInputUsabiliyRuleset(); 
     44        assertThat(ruleset).isInstanceOf(TextInputUsabiliyRuleset.class).has(usabilityRules()); 
    2445    } 
    25      
     46 
    2647    @Test 
    2748    public void mouse_interaction_ruleset_factory_method_should_return_mouse_interaction_ruleset() { 
    2849        UsabilityRuleset ruleset = mouseInteractionUsabiliyRuleset(); 
    29         assertThat(ruleset).isInstanceOf(MouseInteractionUsabilityRuleset.class).has(usabilityRules()); 
     50        assertThat(ruleset).isInstanceOf(MouseInteractionUsabilityRuleset.class) 
     51            .has(usabilityRules()); 
    3052    } 
    3153 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/sandboxapp/CreateClickstreamImageFromTaskTreeDemoApp.java

    r1030 r1040  
     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 
    115package de.ugoe.cs.autoquest.usability.sandboxapp; 
    216 
     
    2135import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskTreeUtil; 
    2236 
     37/** 
     38 * <p> 
     39 * TODO comment 
     40 * </p> 
     41 *  
     42 * @author Alexander Deicke 
     43 */ 
    2344public class CreateClickstreamImageFromTaskTreeDemoApp { 
    2445 
    2546    private static final String fileToParse = "javatrace.xml"; 
    26      
     47 
    2748    private static final String clickstreamFilename = "clickstream.png"; 
    28      
     49 
    2950    /** 
    3051     * <p> 
    3152     * TODO: comment 
    3253     * </p> 
    33      * 
     54     *  
    3455     * @param args 
    35      * @throws IOException  
     56     * @throws IOException 
    3657     */ 
    3758    public static void main(String[] args) throws IOException { 
    3859        ITaskTree taskTree = GenerateTaskTreeUtil.getTaskTreeFromFile(fileToParse); 
    3960        FilterStatistic mouseInteractions = filterMouseInteractions(taskTree); 
    40          
     61 
    4162        BufferedImage clickstreamImage = new BufferedImage(1024, 768, BufferedImage.TYPE_INT_ARGB); 
    4263        Graphics2D drawArea = clickstreamImage.createGraphics(); 
    4364        drawArea.setColor(Color.BLACK); 
    44         drawArea.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); 
    45          
     65        drawArea.setRenderingHint(RenderingHints.KEY_ANTIALIASING, 
     66                                  RenderingHints.VALUE_ANTIALIAS_ON); 
     67 
    4668        drawClickstream(mouseInteractions, drawArea); 
    4769 
     
    5274        int xb = -1; 
    5375        int yb = -1; 
    54          
    55         for(ITaskTreeNode node : mouseInteractions.nodesMatchedFilter()) { 
    56             MouseButtonInteraction interaction = (MouseButtonInteraction) ((IEventTask) node).getEventType(); 
     76 
     77        for (ITaskTreeNode node : mouseInteractions.nodesMatchedFilter()) { 
     78            MouseButtonInteraction interaction = 
     79                (MouseButtonInteraction) ((IEventTask) node).getEventType(); 
    5780            int x = interaction.getX(); 
    5881            int y = interaction.getY(); 
    59             g2.fillOval(x,y,1,1); 
    60             if(xb != -1 && y != -1) g2.drawLine(x, y, xb, yb); 
     82            g2.fillOval(x, y, 1, 1); 
     83            if (xb != -1 && y != -1) 
     84                g2.drawLine(x, y, xb, yb); 
    6185            xb = x; 
    6286            yb = y; 
    6387        } 
    6488    } 
    65      
     89 
    6690    private static FilterStatistic filterMouseInteractions(ITaskTree taskTree) { 
    6791        return new TaskTreeFilter(new IterativeDFSFilterStrategy()) 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/sandboxapp/CreateHeatmapImageFromTaskTreeDemoApp.java

    r1030 r1040  
     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. 
    114 
    215package de.ugoe.cs.autoquest.usability.sandboxapp; 
     
    1831import de.ugoe.cs.autoquest.usability.testutil.GenerateTaskTreeUtil; 
    1932 
     33/** 
     34 * <p> 
     35 * TODO comment 
     36 * </p> 
     37 *  
     38 * @author Alexander Deicke 
     39 */ 
    2040public class CreateHeatmapImageFromTaskTreeDemoApp { 
    2141 
    2242    private static final String fileToParse = "javatrace.xml"; 
    23      
     43 
    2444    private static final String heatmapFilename = "click-heatmap.png"; 
    2545 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/sandboxapp/TaskTreeVisualizerDemoApp.java

    r1030 r1040  
    145145    RadialTreeLayout<String, Integer> radialLayout; 
    146146 
    147     @SuppressWarnings({ "unchecked", "rawtypes" }) 
     147    @SuppressWarnings( 
     148        { "unchecked", "rawtypes" }) 
    148149    public TaskTreeVisualizerDemoApp(String filetoparse) { 
    149          
    150         ITaskTree taskTree = GenerateTaskTreeUtil.getTaskTreeFromFile(filetoparse);  
    151          
     150 
     151        ITaskTree taskTree = GenerateTaskTreeUtil.getTaskTreeFromFile(filetoparse); 
     152 
    152153        // create a simple graph for the demo 
    153154        graph = new DelegateForest<String, Integer>(); 
     
    274275        content.add(controls, BorderLayout.SOUTH); 
    275276    } 
    276      
     277 
    277278    class Rings implements VisualizationServer.Paintable { 
    278279 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/DummyUsabilityGuidlineDescriptionResolver.java

    r1030 r1040  
     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 
    115package de.ugoe.cs.autoquest.usability.testutil; 
    216 
     
    519import de.ugoe.cs.autoquest.usability.evaluation.rule.set.UsabilityRule; 
    620 
    7 public class DummyUsabilityGuidlineDescriptionResolver implements UsabilityDefectDescriptionResolver { 
     21/** 
     22 * <p> 
     23 * TODO comment 
     24 * </p> 
     25 *  
     26 * @author Alexander Deicke 
     27 */ 
     28public class DummyUsabilityGuidlineDescriptionResolver implements 
     29    UsabilityDefectDescriptionResolver 
     30{ 
    831 
    932    public DefectDescription descriptionFor(UsabilityRule usabilityRule) { 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/DummyUsabilityRuleset.java

    r1034 r1040  
     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 
    115package de.ugoe.cs.autoquest.usability.testutil; 
    216 
     
    1327import de.ugoe.cs.autoquest.usability.evaluation.rule.set.UsabilityRuleset; 
    1428 
     29/** 
     30 * <p> 
     31 * TODO comment 
     32 * </p> 
     33 *  
     34 * @author Alexander Deicke 
     35 */ 
    1536public class DummyUsabilityRuleset implements UsabilityRuleset { 
    1637 
    1738    private enum DummyUsabilityRule implements UsabilityRule { 
    18          
     39 
    1940        DUMMY_RULE_WITH_RECOMMENDATION { 
    20              
     41 
    2142            @Override 
    2243            public Optional<UsabilityDefect> evaluate(ITaskTree taskTree) { 
    23                 return Optional.of(new UsabilityDefectFactory(new DummyUsabilityGuidlineDescriptionResolver()). 
    24                                    createUsabilityGuidlineRecommendation(UsabilityDefectSeverityLevel.INFO, this, Collections.<String, String> emptyMap())); 
     44                return Optional 
     45                    .of(new UsabilityDefectFactory(new DummyUsabilityGuidlineDescriptionResolver()) 
     46                        .createUsabilityGuidlineRecommendation(UsabilityDefectSeverityLevel.INFO, 
     47                                                               this, Collections 
     48                                                                   .<String, String> emptyMap())); 
    2549            } 
    2650 
     
    2852                return this.name(); 
    2953            } 
    30              
     54 
    3155        }, 
    32          
     56 
    3357        DUMMY_RULE_WITHOUT_RECOMMENDATION { 
    34              
     58 
    3559            @Override 
    3660            public Optional<UsabilityDefect> evaluate(ITaskTree taskTree) { 
     
    4670 
    4771    } 
    48      
    49     private final EnumSet<DummyUsabilityRule> DUMMY_USABILITY_RULESET =  
    50             EnumSet.allOf(DummyUsabilityRule.class); 
     72 
     73    private final EnumSet<DummyUsabilityRule> DUMMY_USABILITY_RULESET = EnumSet 
     74        .allOf(DummyUsabilityRule.class); 
    5175 
    5276    public EnumSet<? extends UsabilityRule> evaluationRules() { 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/FestConditionUtil.java

    r1034 r1040  
     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 
    115package de.ugoe.cs.autoquest.usability.testutil; 
    216 
     
    1024import de.ugoe.cs.autoquest.usability.evaluation.rule.set.UsabilityRuleset; 
    1125 
     26/** 
     27 * <p> 
     28 * TODO comment 
     29 * </p> 
     30 *  
     31 * @author Alexander Deicke 
     32 */ 
    1233public class FestConditionUtil { 
    1334 
     
    1536        // no good idea 
    1637    } 
    17      
     38 
    1839    public static Condition<UsabilityEvaluationReport> noUsabilityGuidlineRecommendations() { 
    1940        return new Condition<UsabilityEvaluationReport>() { 
    20      
     41 
    2142            @Override 
    2243            public boolean matches(UsabilityEvaluationReport usabilityEvaluationReport) { 
     
    2546        }; 
    2647    } 
    27      
     48 
    2849    public static Condition<UsabilityEvaluationReport> usabilityGuidlineRecommendations() { 
    2950        return new Condition<UsabilityEvaluationReport>() { 
    30      
     51 
    3152            @Override 
    3253            public boolean matches(UsabilityEvaluationReport usabilityEvaluationReport) { 
     
    3556        }; 
    3657    } 
    37      
     58 
    3859    public static Condition<UsabilityRuleset> noUsabilityRules() { 
    3960        return new Condition<UsabilityRuleset>() { 
     
    4364                return usabilityRuleset.evaluationRules().isEmpty(); 
    4465            } 
    45      
    4666 
    4767        }; 
    4868    } 
    49      
     69 
    5070    public static Condition<UsabilityRuleset> usabilityRules() { 
    5171        return new Condition<UsabilityRuleset>() { 
     
    5575                return !usabilityRuleset.evaluationRules().isEmpty(); 
    5676            } 
    57      
    5877 
    5978        }; 
    6079    } 
    61      
     80 
    6281    public static Condition<Optional<UsabilityDefect>> present() { 
    6382        return new Condition<Optional<UsabilityDefect>>() { 
     
    6786                return usabilityGuidlineRecommendation.isPresent(); 
    6887            } 
    69      
     88 
    7089        }; 
    7190    } 
    72      
     91 
    7392    public static Condition<Optional<UsabilityDefect>> absent() { 
    7493        return new Condition<Optional<UsabilityDefect>>() { 
     
    7897                return !usabilityGuidlineRecommendation.isPresent(); 
    7998            } 
    80      
     99 
    81100        }; 
    82101    } 
    83      
     102 
    84103    public static Condition<Optional<UsabilityDefect>> infoRecommendationSeverityLevel() { 
    85104        return new Condition<Optional<UsabilityDefect>>() { 
     
    87106            @Override 
    88107            public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 
    89                 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.INFO); 
     108                return usabilityGuidlineRecommendation.get().getSeverityLevel() 
     109                    .equals(UsabilityDefectSeverityLevel.INFO); 
    90110            } 
    91111 
    92112        }; 
    93113    } 
    94      
     114 
    95115    public static Condition<Optional<UsabilityDefect>> lowRecommendationSeverityLevel() { 
    96116        return new Condition<Optional<UsabilityDefect>>() { 
     
    98118            @Override 
    99119            public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 
    100                 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.LOW); 
     120                return usabilityGuidlineRecommendation.get().getSeverityLevel() 
     121                    .equals(UsabilityDefectSeverityLevel.LOW); 
    101122            } 
    102123 
    103124        }; 
    104125    } 
    105      
     126 
    106127    public static Condition<Optional<UsabilityDefect>> mediumRecommendationSeverityLevel() { 
    107128        return new Condition<Optional<UsabilityDefect>>() { 
     
    109130            @Override 
    110131            public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 
    111                 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.MEDIUM); 
     132                return usabilityGuidlineRecommendation.get().getSeverityLevel() 
     133                    .equals(UsabilityDefectSeverityLevel.MEDIUM); 
    112134            } 
    113135 
    114136        }; 
    115137    } 
    116      
     138 
    117139    public static Condition<Optional<UsabilityDefect>> highRecommendationSeverityLevel() { 
    118140        return new Condition<Optional<UsabilityDefect>>() { 
     
    120142            @Override 
    121143            public boolean matches(Optional<UsabilityDefect> usabilityGuidlineRecommendation) { 
    122                 return usabilityGuidlineRecommendation.get().getSeverityLevel().equals(UsabilityDefectSeverityLevel.HIGH); 
     144                return usabilityGuidlineRecommendation.get().getSeverityLevel() 
     145                    .equals(UsabilityDefectSeverityLevel.HIGH); 
    123146            } 
    124147 
    125148        }; 
    126149    } 
    127      
     150 
    128151} 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/GenerateTaskTreeUtil.java

    r1030 r1040  
     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. 
    114 
    215package de.ugoe.cs.autoquest.usability.testutil; 
     
    1730import de.ugoe.cs.util.console.TextConsole; 
    1831 
     32/** 
     33 * <p> 
     34 * TODO comment 
     35 * </p> 
     36 *  
     37 * @author Alexander Deicke 
     38 */ 
    1939public class GenerateTaskTreeUtil { 
    20      
     40 
    2141    private static final String seqName = "sequences"; 
    2242 
  • trunk/autoquest-core-usability-evaluation-test/src/main/java/de/ugoe/cs/autoquest/usability/testutil/TaskTreeBuilder.java

    r1030 r1040  
     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 
    115package de.ugoe.cs.autoquest.usability.testutil; 
    216 
     
    620import de.ugoe.cs.autoquest.tasktrees.treeimpl.TaskTreeNodeFactory; 
    721 
     22/** 
     23 * <p> 
     24 * TODO comment 
     25 * </p> 
     26 *  
     27 * @author Alexander Deicke 
     28 */ 
    829public class TaskTreeBuilder { 
    9      
     30 
    1031    public static CreateRootNodeStep builder() { 
    1132        return new CreateRootNodeStep(); 
    1233    } 
    13      
     34 
    1435    public static class CreateRootNodeStep { 
    15          
     36 
    1637        public AddChildrenStep root(String name) { 
    1738            return new AddChildrenStep(new TaskTreeNode(name)); 
    1839        } 
    19          
     40 
    2041    } 
    21      
     42 
    2243    public static class AddChildrenStep { 
    23          
     44 
    2445        private TaskTreeNode rootNode; 
    25          
     46 
    2647        public AddChildrenStep(TaskTreeNode taskTreeRootNode) { 
    2748            this.rootNode = taskTreeRootNode; 
     
    3253            return this; 
    3354        } 
    34          
     55 
    3556        public ITaskTree creatTaskTree() { 
    3657            return new TaskTreeNodeFactory().createTaskTree(rootNode); 
    3758        } 
    38          
     59 
    3960    } 
    40      
    41 //        private Employee employee; 
    42 // 
    43 //        public EmployeeBuilder() { 
    44 //            employee = new Employee(); 
    45 //        } 
    46 // 
    47 //        public static EmployeeBuilder defaultValues() { 
    48 //            return new EmployeeBuilder(); 
    49 //        } 
    50 // 
    51 //        public static EmployeeBuilder clone(Employee toClone) { 
    52 //            EmployeeBuilder builder = defaultValues(); 
    53 //            builder.setId(toClone.getId()); 
    54 //            builder.setName(toClone.getName()); 
    55 //            builder.setDepartment(toClone.getDepartment()); 
    56 //            return builder; 
    57 //        } 
    58 // 
    59 //        public static EmployeeBuilder random() { 
    60 //            EmployeeBuilder builder = defaultValues(); 
    61 //            builder.setId(getRandomInteger(0, 1000)); 
    62 //            builder.setName(getRandomString(20)); 
    63 //            builder.setDepartment(Department.values()[getRandomInteger(0, Department.values().length - 1)]); 
    64 //            return builder; 
    65 //        } 
    66 // 
    67 //        public EmployeeBuilder setId(int id) { 
    68 //            employee.setId(id); 
    69 //            return this; 
    70 //        } 
    71 // 
    72 //        public EmployeeBuilder setName(String name) { 
    73 //            employee.setName(name); 
    74 //            return this; 
    75 //        } 
    76 // 
    77 //        public EmployeeBuilder setDepartment(Department dept) { 
    78 //            employee.setDepartment(dept); 
    79 //            return this; 
    80 //        } 
    81 // 
    82 //        public Employee build() { 
    83 //            return employee; 
    84 //        } 
    85 //    } 
     61 
     62    // private Employee employee; 
     63    // 
     64    // public EmployeeBuilder() { 
     65    // employee = new Employee(); 
     66    // } 
     67    // 
     68    // public static EmployeeBuilder defaultValues() { 
     69    // return new EmployeeBuilder(); 
     70    // } 
     71    // 
     72    // public static EmployeeBuilder clone(Employee toClone) { 
     73    // EmployeeBuilder builder = defaultValues(); 
     74    // builder.setId(toClone.getId()); 
     75    // builder.setName(toClone.getName()); 
     76    // builder.setDepartment(toClone.getDepartment()); 
     77    // return builder; 
     78    // } 
     79    // 
     80    // public static EmployeeBuilder random() { 
     81    // EmployeeBuilder builder = defaultValues(); 
     82    // builder.setId(getRandomInteger(0, 1000)); 
     83    // builder.setName(getRandomString(20)); 
     84    // builder.setDepartment(Department.values()[getRandomInteger(0, Department.values().length - 
     85    // 1)]); 
     86    // return builder; 
     87    // } 
     88    // 
     89    // public EmployeeBuilder setId(int id) { 
     90    // employee.setId(id); 
     91    // return this; 
     92    // } 
     93    // 
     94    // public EmployeeBuilder setName(String name) { 
     95    // employee.setName(name); 
     96    // return this; 
     97    // } 
     98    // 
     99    // public EmployeeBuilder setDepartment(Department dept) { 
     100    // employee.setDepartment(dept); 
     101    // return this; 
     102    // } 
     103    // 
     104    // public Employee build() { 
     105    // return employee; 
     106    // } 
     107    // } 
    86108 
    87109} 
Note: See TracChangeset for help on using the changeset viewer.