source: trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/UsabilityDefectDescriptionTest.java @ 475

Last change on this file since 475 was 475, checked in by pharms, 12 years ago

improved code coverage for defect description class

File size: 2.3 KB
Line 
1//-------------------------------------------------------------------------------------------------
2// Module    : $RCSfile: UsabilityDefectDescriptionTest.java,v $
3// Version   : $Revision: 0.0 $  $Author: pharms $  $Date: 20.07.2012 $
4// Project   : UsabilityEvaluationManager
5// Creation  : 2012 by pharms
6// Copyright : Patrick Harms, 2012
7//-------------------------------------------------------------------------------------------------
8package de.ugoe.cs.quest.usability;
9
10import static org.junit.Assert.*;
11
12import java.util.HashMap;
13import java.util.Map;
14
15import org.junit.Test;
16
17import de.ugoe.cs.quest.usability.UsabilityDefectDescription;
18
19//-------------------------------------------------------------------------------------------------
20/**
21 * TODO comment
22 *
23 * @version $Revision: $ $Date: 20.07.2012$
24 * @author 2012, last modified by $Author: pharms$
25 */
26//-------------------------------------------------------------------------------------------------
27public class UsabilityDefectDescriptionTest
28{
29
30  //-----------------------------------------------------------------------------------------------
31  /**
32   * TODO: comment
33   *
34   */
35  //-----------------------------------------------------------------------------------------------
36  @Test
37  public void testInitialization()
38  {
39    for (UsabilityDefectDescription description : UsabilityDefectDescription.values())
40    {
41      assertNotNull(description.toString());
42      assertNotSame("", description.toString());
43      System.err.println(description);
44    }
45  }
46
47  //-----------------------------------------------------------------------------------------------
48  /**
49   * TODO: comment
50   *
51   */
52  //-----------------------------------------------------------------------------------------------
53  @Test
54  public void testParameterization()
55  {
56    for (UsabilityDefectDescription description : UsabilityDefectDescription.values())
57    {
58      Map<String, String> parameters = new HashMap<String, String>();
59     
60      for (String parameter : description.getDescriptionParameters())
61      {
62        parameters.put(parameter, "<parameter " + parameter + ">");
63      }
64     
65      assertNotNull(description.toString(parameters));
66      assertNotSame("", description.toString(parameters));
67      System.err.println(description.toString(parameters));
68    }
69  }
70
71}
Note: See TracBrowser for help on using the repository browser.