Ignore:
Timestamp:
07/25/12 13:47:47 (12 years ago)
Author:
pharms
Message:

improved code coverage for defect description class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/quest-core-usability-test/src/test/java/de/ugoe/cs/quest/usability/UsabilityDefectDescriptionTest.java

    r474 r475  
    99 
    1010import static org.junit.Assert.*; 
     11 
     12import java.util.HashMap; 
     13import java.util.Map; 
    1114 
    1215import org.junit.Test; 
     
    3437  public void testInitialization() 
    3538  { 
    36     assertNotNull(UsabilityDefectDescription.TEXT_FIELD_INPUT_RATIO.toString()); 
    37     assertNotSame("", UsabilityDefectDescription.TEXT_FIELD_INPUT_RATIO.toString()); 
    38     System.err.println(UsabilityDefectDescription.TEXT_FIELD_INPUT_RATIO); 
    39      
    40     assertNotNull(UsabilityDefectDescription.TEXT_FIELD_INPUT_REPETITIONS.toString()); 
    41     assertNotSame("", UsabilityDefectDescription.TEXT_FIELD_INPUT_REPETITIONS.toString()); 
    42     System.err.println(UsabilityDefectDescription.TEXT_FIELD_INPUT_REPETITIONS); 
     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    } 
    4369  } 
    4470 
Note: See TracChangeset for help on using the changeset viewer.