5. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/4/2017 8:04:33 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

5.1 Files compared

# Location File Last Modified
1 rdk.zip\rdk\product\production\jbpm\EhmpServices\src\test\java\gov\va\clinicalobjectstorageservice TransformResultTests.java Mon Aug 21 12:51:00 2017 UTC
2 rdk.zip\rdk\product\production\jbpm\EhmpServices\src\test\java\gov\va\clinicalobjectstorageservice TransformResultTests.java Tue Oct 3 17:11:01 2017 UTC

5.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 2 144
Changed 1 2
Inserted 0 0
Removed 0 0

5.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

5.4 Active regular expressions

No regular expressions were active.

5.5 Comparison detail

  1   package go v.va.clini calobjects torageserv ice;
  2  
  3   import sta tic org.ju nit.Assert .*;
  4   import gov .va.clinic alobjectst orageservi ce.Clinica lObjectWri teHandler;
  5   import gov .va.ehmp.s ervices.ex ception.Eh mpServices Exception;
  6  
  7   import org .junit.Tes t;
  8  
  9   import com .google.gs on.JsonObj ect;
  10   import com .google.gs on.JsonPar ser;
  11  
  12   public cla ss Transfo rmResultTe sts {
  13  
  14           Cl inicalObje ctWriteHan dler write Handler =  new Clinic alObjectWr iteHandler ();
  15           
  16           @T est
  17           pu blic void  emptyResul tTest() th rows EhmpS ervicesExc eption {
  18                    Stri ng result  = writeHan dler.trans formResult ("");
  19                                      
  20                    asse rtEquals(" ", result) ;
  21           }
  22           
  23           @T est
  24           pu blic void  noElements InResultJS ONTest() t hrows Ehmp ServicesEx ception {
  25                    Stri ng result  = writeHan dler.trans formResult ("{}");
  26                    asse rtNotEqual s("", resu lt);
  27                    
  28                    Json Parser par ser = new  JsonParser ();
  29                    Json Object obj  = parser. parse(resu lt).getAsJ sonObject( );
  30                    
  31                    asse rtTrue(obj .has("stat us") && ob j.get("sta tus").isJs onPrimitiv e());
  32                    asse rtEquals(2 00, obj.ge t("status" ).getAsInt ());
  33                    asse rtTrue(obj .has("uid" ) && obj.g et("uid"). isJsonPrim itive());          
  34                    asse rtEquals(" ", obj.get ("uid").ge tAsString( ));
  35           }
  36  
  37           @T est
  38           pu blic void  noHeadersE lementInRe sultJSONTe st() throw s EhmpServ icesExcept ion {
  39                    Stri ng result  = writeHan dler.trans formResult ("{\"data\ ":{}}");
  40                    Json Parser par ser = new  JsonParser ();
  41                    Json Object obj  = parser. parse(resu lt).getAsJ sonObject( );
  42                    
  43                    asse rtTrue(obj .has("stat us") && ob j.get("sta tus").isJs onPrimitiv e());
  44                    asse rtEquals(2 00, obj.ge t("status" ).getAsInt ());
  45                    asse rtTrue(obj .has("uid" ) && obj.g et("uid"). isJsonPrim itive());          
  46                    asse rtEquals(" ", obj.get ("uid").ge tAsString( ));
  47           }
  48  
  49           @T est
  50           pu blic void  noLocation ElementInR esultJSONT est() thro ws EhmpSer vicesExcep tion {
  51                    Stri ng result  = writeHan dler.trans formResult ("{\"data\ ":{\"heade rs\":{}}}" );
  52                    Json Parser par ser = new  JsonParser ();
  53                    Json Object obj  = parser. parse(resu lt).getAsJ sonObject( );
  54                    
  55                    asse rtTrue(obj .has("stat us") && ob j.get("sta tus").isJs onPrimitiv e());
  56                    asse rtEquals(2 00, obj.ge t("status" ).getAsInt ());
  57                    asse rtTrue(obj .has("uid" ) && obj.g et("uid"). isJsonPrim itive());          
  58                    asse rtEquals(" ", obj.get ("uid").ge tAsString( ));
  59           }
  60           
  61           @T est
  62           pu blic void  validResul tJSONTest( ) throws E hmpService sException  {
  63                     String res ult = writ eHandler.t ransformRe sult("{\"d ata\":{\"h eaders\":{ \"location \":\"http: // IP                /clinicobj /urn:va:eh mp-activit y:9E7A:3:f 385c135-79 d7-47b7-ae 7b-08d6db7 53bce\"}}} ");
  64                    Json Parser par ser = new  JsonParser ();
  65                    Json Object obj  = parser. parse(resu lt).getAsJ sonObject( );
  66                    
  67                    asse rtTrue(obj .has("stat us") && ob j.get("sta tus").isJs onPrimitiv e());
  68                    asse rtEquals(2 00, obj.ge t("status" ).getAsInt ());
  69                    asse rtTrue(obj .has("uid" ) && obj.g et("uid"). isJsonPrim itive());          
  70                    asse rtEquals(" urn:va:ehm p-activity :9E7A:3:f3 85c135-79d 7-47b7-ae7 b-08d6db75 3bce", obj .get("uid" ).getAsStr ing());
  71           }
  72  
  73   }