99. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 2/7/2017 12:14:10 PM 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.

99.1 Files compared

# Location File Last Modified
1 cpss.zip\cpss\src\test\java\gov\va\cpss\job\fps ProcessFPSDataJobTest.java Wed Feb 1 21:07:32 2017 UTC
2 cpss.zip\cpss\src\test\java\gov\va\cpss\job\fps ProcessFPSDataJobTest.java Mon Feb 6 16:32:36 2017 UTC

99.2 Comparison summary

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

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

99.4 Active regular expressions

No regular expressions were active.

99.5 Comparison detail

  1   package go v.va.cpss. job.fps;
  2  
  3   import jav a.io.File;
  4   import jav a.util.Arr ays;
  5   import jav a.util.Lis t;
  6  
  7   import org .springfra mework.bat ch.core.Jo bExecution ;
  8   import org .springfra mework.bat ch.core.Jo bParameter s;
  9  
  10   import gov .va.cpss.j ob.Process FPSDataJob ;
  11   import gov .va.cpss.m odel.Batch Job;
  12   import gov .va.cpss.m odel.Batch Run;
  13   import gov .va.cpss.m odel.fps.P SReceived;
  14  
  15   /**
  16    * Test cl ass that t ests the c orrect pro cessing ex ecution of  the
  17    * Process FPSDataJob  using loc al file fo r test ins tead of ft p. It is i mportant
  18    * to note  that it b ypasses th e quartz s cheduling  portion of  the batch  process.
  19    * The int ent is to  support in tegration  testing of  the actua l input fi le
  20    * process ing busine ss logic.  This class  extends P rocessFPSD ataJob sim ply to
  21    * facilit ate testin g in the P rocessFPSD ataJobBatc hIT.
  22    * 
  23    * @author   DN S      D N S
  24    */
  25   public cla ss Process FPSDataJob Test exten ds Process FPSDataJob  {
  26  
  27           pr ivate PSRe ceived rec eived;
  28           pr ivate JobE xecution e xecution;
  29  
  30           /* *
  31            *  Get the P SReceived  object. Th is object  is checked  for expec ted values  for
  32            *  verificat ion tests.
  33            *  
  34            *  @return P SReceived  object.
  35            * /
  36           pu blic PSRec eived getR eceived()  {
  37                    retu rn receive d;
  38           }
  39  
  40           pu blic JobEx ecution ge tExecution () {
  41                    retu rn executi on;
  42           }
  43  
  44           /* *
  45            *  Set an in valid file  path.
  46            * /
  47           pu blic void  setInvalid FilePath()  {
  48                    file name = "fp s/fake_fil e_path.txt ";
  49           }
  50  
  51           /* *
  52            *  Sets a lo cal projec t file to  use for te st.
  53            * /
  54           pu blic void  setFilePat h(final St ring fp) {
  55                    Clas sLoader cl assLoader  = this.get Class().ge tClassLoad er();
  56                    File  file = ne w File(cla ssLoader.g etResource (fp).getFi le());
  57                    this .filename  = file.get AbsolutePa th();
  58           }
  59  
  60           /* *
  61            *  Method ba sed on the  parent cl ass runJob  method to  capture t he PSRecei ved
  62            *  object fo r verifica tion tests . This met hod tests  the suppor ting metho ds
  63            *  to verify  proper ha ndling of  an input f ile.
  64            *  
  65            *  @return B oolean val ue indicat ing if suc cessful or  not.
  66            * /
  67           pu blic boole an testJob () {
  68  
  69                    bool ean succes sful = fal se;
  70  
  71                    Batc hJob bj =  batchServi ce.getBatc hJobByName (name);
  72                    Batc hRun bR =  batchServi ce.startRu n(bj.getId ());
  73  
  74                    rese tMessages( );
  75  
  76                    rece ived = ini tializeJob (bR.getId( ));
  77  
  78                    JobP arameters  parameters  = getPara meters(rec eived);
  79  
  80                    exec ution = ex ecuteJob(g etJob(), p arameters) ;
  81  
  82                    succ essful = f psService. endProcess FpsDataJob (execution , received );
  83  
  84                    if ( successful ) {
  85                             comple teRun(bR);
  86                    } el se {
  87                             errorR un(bR);
  88                    }
  89  
  90                    retu rn success ful;
  91           }
  92  
  93           /* *
  94            *  Method ba sed on the  parent cl ass runJob  method to  run a job . This met hod
  95            *  tests the  ftp inter face to ve rify prope r handling  of an ftp  input.
  96            *  
  97            *  @return B oolean val ue indicat ing if suc cessful or  not.
  98            * /
  99           pu blic boole an testFtp Job() {
  100  
  101                    Batc hJob bj =  batchServi ce.getBatc hJobByName (name);
  102                    Batc hRun bR =  batchServi ce.startRu n(bj.getId ());
  103  
  104                    rese tMessages( );
  105  
  106                    fina l boolean  successful  = super.r unJob(bR,  getJob());
  107  
  108                    if ( successful ) {
  109                             comple teRun(bR);
  110                    } el se {
  111                             errorR un(bR);
  112                    }
  113  
  114                    retu rn success ful;
  115           }
  116  
  117           /* *
  118            *  Method ba sed on the  parent cl ass runJob  method to  run a job . This met hod
  119            *  tests the  ftp inter face to ve rify prope r handling  of an err oneous ftp
  120            *  input.
  121            *  
  122            *  @return B oolean val ue indicat ing if suc cessful or  not.
  123            * /
  124           pu blic boole an testErr orFtpJob()  {
  125  
  126                    Batc hJob bj =  batchServi ce.getBatc hJobByName (name);
  127                    Batc hRun bR =  batchServi ce.startRu n(bj.getId ());
  128  
  129                    rese tMessages( );
  130  
  131                    List <String> f ileL = Arr ays.asList ("fake_fil e_path.don ");
  132  
  133                    fina l boolean  successful  = process List(bR.ge tId(), get Job(), fil eL);
  134  
  135                    if ( successful ) {
  136                             comple teRun(bR);
  137                    } el se {
  138                             errorR un(bR);
  139                    }
  140  
  141                    retu rn success ful;
  142           }
  143   }