283. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 2/4/2019 11:34:05 AM Eastern Standard 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.

283.1 Files compared

# Location File Last Modified
1 MHPRO_v1.x.zip\mhpro-resources-master@a26412b610c.zip\ws\src\test\java\gov\va\mobile\vamf\mhpro\rpc\dao\impl RpcRulesDAOTest.java Tue Nov 14 19:31:17 2017 UTC
2 MHPRO_v1.x.zip\mhpro-resources-master@a26412b610c.zip\ws\src\test\java\gov\va\mobile\vamf\mhpro\rpc\dao\impl RpcRulesDAOTest.java Fri Feb 1 19:27:43 2019 UTC

283.2 Comparison summary

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

283.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

283.4 Active regular expressions

No regular expressions were active.

283.5 Comparison detail

  1   package go v.va.mobil e.vamf.mhp ro.rpc.dao .impl;
  2  
  3   import jav a.util.Lis t;
  4  
  5   import jav ax.resourc e.cci.Conn ectionSpec ;
  6  
  7   import org .junit.Aft er;
  8   import org .junit.Bef ore;
  9   import org .junit.Tes t;
  10   import org .junit.run ner.RunWit h;
  11   import org .mockito.M ock;
  12   import org .mockito.r unners.Moc kitoJUnitR unner;
  13   import org .springfra mework.tes t.util.Ref lectionTes tUtils;
  14   import sta tic org.mo ckito.Mock ito.when;
  15   import sta tic org.ju nit.Assert .assertNot Null;
  16   import sta tic org.ju nit.Assert .assertTru e;
  17   import sta tic org.mo ckito.Matc hers.any;
  18  
  19   import gov .va.med.ci ss.service .VistaCust omization;
  20   import gov .va.med.ci ss.service .log.Logge rListener;
  21   import gov .va.med.ci ss.service .vista.RPC Exception;
  22   import gov .va.med.ci ss.service .vista.Rpc ServiceUti l;
  23   import gov .va.med.ci ss.service .vista.Rpc ServiceUti lFactory;
  24   import gov .va.med.ci ss.service .vistalink .KaajeeSer vice;
  25   import gov .va.med.ci ss.service .vistalink .VistaLink Service;
  26   import gov .va.mobile .vamf.mhpr o.rpc.Rule ;
  27   import gov .va.mobile .vamf.mhpr o.service. IVistaLink AuditServi ce;
  28  
  29   /**
  30    * @author   PII
  31    *
  32    * The Cla ss RpcRule sDAOTest.
  33    */
  34   @RunWith(M ockitoJUni tRunner.cl ass)
  35   public cla ss RpcRule sDAOTest {
  36  
  37           pr ivate RpcR ulesDAO rp cRulesDAO;
  38  
  39           /* * The rpc  service ut il factory . */
  40           @M ock
  41           pr ivate RpcS erviceUtil Factory rp cServiceUt ilFactory;
  42           @M ock
  43       privat e IVistaLi nkAuditSer vice vista LinkAuditS ervice;
  44  
  45           @B efore
  46           pu blic void  setUp() th rows Excep tion {
  47                    rpcR ulesDAO =  new RpcRul esDAO();
  48                    Refl ectionTest Utils.setF ield(rpcRu lesDAO, "r pcServiceU tilFactory ", rpcServ iceUtilFac tory);
  49                    Refl ectionTest Utils.setF ield(rpcRu lesDAO, "v istaLinkAu ditService ", vistaLi nkAuditSer vice);          
  50           }
  51  
  52           @A fter
  53           pu blic void  tearDown()  throws Ex ception {
  54           }
  55  
  56  
  57           /* *
  58            *  test RpcR ulesDAO
  59            *  
  60            *  @throws E xception
  61            * /
  62           @T est
  63           pu blic void  testRpcRul esDAO() th rows Excep tion {
  64                    Mock RpcService Util mockU til = new  MockRpcSer viceUtil(n ull,null,n ull);
  65                    when (rpcServic eUtilFacto ry.getInst ance(any(O bject.clas s))).thenR eturn(mock Util);
  66                    
  67                    Stri ng divisio n = "442";
  68                    Stri ng instrum ent = "GAD -7";    //  "BAM-R"
  69                    Stri ng duz = " 74";
  70                    List <Rule> rul es = rpcRu lesDAO.ret rieveRules (division,  instrumen t, duz);
  71                    asse rtNotNull( rules);
  72                    asse rtTrue(rul es.size()  >= 1);
  73                    asse rtTrue(rul es.size()  == 2);
  74                    
  75                    // / / check on e of the o bjects
  76                    Rule  rule = ru les.get(0) ;
  77                    //Sy stem.out.p rintln("ru le:"+rule) ;
  78  
  79                    asse rtTrue(rul e.getRuleI d() == 317 );
  80                    asse rtTrue(rul e.getIndex Question()  == 6501);
  81                    asse rtTrue(rul e.getIndex ValueDataT ype().equa ls("NUMBER "));
  82                    asse rtTrue(rul e.getBoolO perator(). equals("AN D"));
  83           }
  84           
  85  
  86           /* *
  87            *  The Class  MockRpcSe rviceUtil.
  88            * /
  89           cl ass MockRp cServiceUt il extends  RpcServic eUtil {
  90  
  91                    /**  The Consta nt data. * /
  92                    priv ate final  static Str ing data =  "[DATA]\n 317=6501^N UMBER^Equa ls^0^AND^\ n^^\n^\n31 8=6503^NUM BER^Equals ^0^AND^\n^ ^\n^\n";
  93  
  94                    /*
  95                     * ( non-Javado c)
  96                     * 
  97                     * @ see
  98                     * g ov.va.med. ciss.servi ce.vista.R pcServiceU til#runRpc (java.lang .String,
  99                     * j ava.lang.S tring, jav a.util.Lis t,
  100                     * g ov.va.med. ciss.servi ce.VistaCu stomizatio n[])
  101                     */
  102                    @Ove rride
  103                    publ ic String  runRpc(Str ing arg0,  String arg 1, List<Ob ject> arg2 , VistaCus tomization ... arg3)
  104                                      throws R PCExceptio n {
  105                             // TOD O Auto-gen erated met hod stub
  106                             String  result =  data;
  107                             return  result;
  108                    }
  109  
  110                    /*
  111                     * ( non-Javado c)
  112                     * 
  113                     * @ see
  114                     * g ov.va.med. ciss.servi ce.vista.R pcServiceU til#setLog gerCallbac k(gov.va
  115                     * . med.ciss.s ervice.log .LoggerLis tener)
  116                     */
  117                    @Ove rride
  118                    publ ic void se tLoggerCal lback(Logg erListener  loggerCal lback) {
  119                             // TOD O Auto-gen erated met hod stub
  120                             super. setLoggerC allback(lo ggerCallba ck);
  121                    }
  122  
  123                    /**
  124                     * I nstantiate s a new mo ck rpc ser vice util.
  125                     *
  126                     * @ param conn Spec
  127                     *              the conn s pec
  128                     * @ param kaaj eeService
  129                     *              the kaajee  service
  130                     * @ param vist aLinkServi ce
  131                     *              the vista  link servi ce
  132                     */
  133                    publ ic MockRpc ServiceUti l(Connecti onSpec con nSpec, Kaa jeeService  kaajeeSer vice,
  134                                      VistaLin kService v istaLinkSe rvice) {
  135                             super( connSpec,  kaajeeServ ice, vista LinkServic e);
  136                             // TOD O Auto-gen erated con structor s tub
  137                    }
  138           }
  139  
  140   }