Downloads Documentation Community Contribute Demo






Show Sidebar
Login | Register
Show
Ignore:
Timestamp:
05/11/08 19:33:53 (4 months ago)
Author:
bwolfe
Message:

Applying patches to logic package and reporting test
Author: tmdugan, mseaton

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • openmrs/trunk/test/api/org/openmrs/test/report/PatientSearchParameterTest.java

    r4158 r4167  
    110110        // Test if the PatientSearch parameters evaluate to the test variable values 
    111111        List<Parameter> parameters = ps2.getParameters(); 
    112               for (Parameter p : parameters) { 
    113                        if ( "TestName".equals(p.getLabel()) ) { 
    114                                assertEquals(testName, context.evaluateExpression(p.getName()).toString()); 
    115                                log.info("Testing Parameters: " + context.evaluateExpression(p.getName()).toString() + " " + testName); 
    116                        
    117                        else if ( "TestSalutation".equals(p.getLabel()) ) { 
    118                                assertEquals(salutation, context.evaluateExpression(p.getName()).toString()); 
    119                                log.info("Testing Parameters: " + context.evaluateExpression(p.getName()).toString() + " " + salutation); 
    120                        
    121                        else if ( "TestDate".equals(p.getLabel()) ) { 
    122                                 assertEquals(df.format(today), context.evaluateExpression(p.getName()).toString());   
    123                                log.info("Testing Parameters: " + context.evaluateExpression(p.getName()).toString() + " " + df.format(today)); 
    124                        
    125                        else { 
    126                                log.info("Testing Parameters: " + context.evaluateExpression(p.getName()).toString() + " " + p.getName()); 
    127                        
    128               } 
     112      for (Parameter p : parameters) { 
     113            if ( "TestName".equals(p.getLabel()) ) { 
     114                    assertEquals(testName, context.evaluateExpression(ps2.getArgumentValue(p.getName())).toString()); 
     115                    log.info("Testing Parameters: " + context.evaluateExpression(p.getName()).toString() + " " + testName); 
     116           
     117            else if ( "TestSalutation".equals(p.getLabel()) ) { 
     118                    assertEquals(salutation, context.evaluateExpression(ps2.getArgumentValue(p.getName())).toString()); 
     119                    log.info("Testing Parameters: " + context.evaluateExpression(p.getName()).toString() + " " + salutation); 
     120           
     121            else if ( "TestDate".equals(p.getLabel()) ) { 
     122                    assertEquals(df.format(today), df.format((Date)context.evaluateExpression(ps2.getArgumentValue(p.getName())))); 
     123                    log.info("Testing Parameters: " + context.evaluateExpression(p.getName()).toString() + " " + df.format(today)); 
     124           
     125            else { 
     126                    log.info("Testing Parameters: " + context.evaluateExpression(p.getName()).toString() + " " + p.getName()); 
     127           
     128      } 
    129129    } 
    130130