127. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 12/20/2017 5:56:13 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.

127.1 Files compared

# Location File Last Modified
1 Genisis_2.0_v6_bld6.zip\Source Code\UI\Services\src\test\java\gov\va\genisis2\dao\impl UserManagementDaoTest.java Thu Dec 14 19:57:17 2017 UTC
2 Genisis_2.0_v6_bld6.zip\Source Code\UI\Services\src\test\java\gov\va\genisis2\dao\impl UserManagementDaoTest.java Wed Dec 20 14:12:43 2017 UTC

127.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 3 614
Changed 2 6
Inserted 0 0
Removed 0 0

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

127.4 Active regular expressions

No regular expressions were active.

127.5 Comparison detail

  1   package go v.va.genis is2.dao.im pl;
  2  
  3   import sta tic org.ju nit.Assert .*;
  4  
  5   import jav a.util.Lis t;
  6  
  7   import org .junit.Fix MethodOrde r;
  8   import org .junit.Tes t;
  9   import org .junit.run ners.Metho dSorters;
  10   import org .slf4j.Log ger;
  11   import org .slf4j.Log gerFactory ;
  12   import org .springfra mework.bea ns.factory .annotatio n.Autowire d;
  13  
  14   import gov .va.genisi s2.Abstrac tMockMvcTe sts;
  15   import gov .va.genisi s2.common. enums.User StatusEnum ;
  16   import gov .va.genisi s2.dao.IUs erManageme ntDao;
  17   import gov .va.genisi s2.excepti ons.Genisi sDAOExcept ion;
  18   import gov .va.genisi s2.excepti ons.Genisi sServiceEx ception;
  19   import gov .va.genisi s2.model.U ser;
  20   import gov .va.genisi s2.model.U serCount;
  21   import gov .va.genisi s2.service .impl.User Management Service;
  22   import gov .va.genisi s2.util.Da teUtil;
  23   import gov .va.genisi s2.util.He lper;
  24  
  25   /**
  26    * The Cla ss UserMan agementDao Test.
  27    *
  28    * @author  Janet Lop ez
  29    * @author  Getaneh K assahun
  30    * 
  31    *          The Class  UserManag ementDaoTe st.
  32    * 
  33    *          Descripti on: In thi s UserMana gementDaoT est Class  which exte nds the
  34    *          abstract  class, Abs tractMockM vcTests, j unit tests  are defin ed.
  35    */
  36   @FixMethod Order(Meth odSorters. NAME_ASCEN DING)
  37   public cla ss UserMan agementDao Test exten ds Abstrac tMockMvcTe sts {
  38  
  39           /* * The LOGG ER. */
  40           pr ivate stat ic final L ogger LOGG ER = Logge rFactory.g etLogger(U serManagem entDaoTest .class);
  41  
  42           /* * The user s. */
  43           pr ivate User  users;
  44  
  45           /* * The user Management Dao. */
  46           @A utowired
  47           pr ivate IUse rManagemen tDao userM anagementD ao;
  48           
  49           pr ivate User Management Dao userMa nagementDa o_SF_NULL;
  50  
  51           /* *
  52            *  Test get  user detai ls by emai l.
  53            *  
  54            *  @throws G enisisDAOE xception
  55            * /
  56           @T est
  57           pu blic void  testGetUse rDetailsBy Email() th rows Genis isDAOExcep tion {
  58  
  59                    LOGG ER.info("* *********J unit Get U ser Detail s By Email ********** ");
  60  
  61                    user s = userMa nagementDa o.getUserD etailsByEm ail("genis isad@gmail .com");
  62                    asse rtNotNull( users);
  63  
  64           }
  65           
  66           /* *
  67            *  Test get  user detai ls by emai l.
  68            *  
  69            *  @throws G enisisDAOE xception
  70            * /
  71           @T est(expect ed = Genis isDAOExcep tion.class )
  72           pu blic void  testGetUse rDetailsBy Email_SF_N ull() thro ws Genisis DAOExcepti on {
  73  
  74                    LOGG ER.info("* *********J unit Get U ser Detail s By Email ********** ");
  75                    setS essionFact ory_Null() ;
  76                    user Management Dao_SF_NUL L.getUserD etailsByEm ail("genis isad@gmail .com");
  77                    
  78  
  79           }
  80  
  81           /* *
  82            *  Test get  User Detai ls By Id.
  83            *  
  84            *  @throws G enisisDAOE xception
  85            * /
  86           @T est
  87           pu blic void  testGetUse rDetailsBy Id() throw s GenisisD AOExceptio n {
  88  
  89                    LOGG ER.info("* *********J unit Get U ser Detail s By Id*** *******");
  90                    user s = userMa nagementDa o.getUserD etailsById (1);
  91                    asse rtNotNull( users);
  92  
  93           }
  94           
  95           /* *
  96            *  Test get  User Detai ls By Id.
  97            *  
  98            *  @throws G enisisDAOE xception
  99            * /
  100           @T est(expect ed = Genis isDAOExcep tion.class )
  101           pu blic void  testGetUse rDetailsBy Id_SF_NULL () throws  GenisisDAO Exception  {
  102  
  103                    LOGG ER.info("* *********J unit Get U ser Detail s By Id*** *******");
  104                    setS essionFact ory_Null() ;
  105                    user Management Dao_SF_NUL L.getUserD etailsById (1);
  106  
  107           }
  108  
  109  
  110           /* *
  111            *  Test get  User Role.
  112            *  
  113            *  @throws G enisisDAOE xception
  114            * /
  115  
  116   /*      @T est
  117           pu blic void  testGetUse rRole() th rows Genis isDAOExcep tion {
  118  
  119                    LOGG ER.info("* *********J unit Get   User Role* *********" );
  120                    Stri ng userRol e = userMa nagementDa o.getUserR ole(1);
  121                    asse rtNotNull( userRole);
  122  
  123           }* /
  124           
  125           /* *
  126            *  Test get  User Role.
  127            *  
  128            *  @throws G enisisDAOE xception
  129            * /
  130  
  131           @T est(expect ed = Genis isDAOExcep tion.class )
  132           pu blic void  testGetUse rRole_SF_N ULL() thro ws Genisis DAOExcepti on {
  133  
  134                    LOGG ER.info("* *********J unit Get   User Role* *********" );
  135                    setS essionFact ory_Null() ;
  136                    user Management Dao_SF_NUL L.getUserR ole(1);
  137  
  138           }
  139  
  140           /* *
  141            *  Test get  UserDetail sByUsernam e.
  142            *  
  143            *  @throws G enisisDAOE xception
  144            * /
  145  
  146           @T est
  147           pu blic void  testGetUse rDetailsBy Username()  throws Ge nisisDAOEx ception {
  148  
  149                    LOGG ER.info("* *********J unit Get U serDetails ByUsername ********** ");
  150                     users = us erManageme ntDao.getU serDetails ByUsername (" DN S      FRANCISS") ;
  151                     assertEqua ls(" DN S      FRANCISS",  users.get Username() );
  152  
  153           }
  154           
  155           /* *
  156            *  Test get  UserDetail sByUsernam e.
  157            *  
  158            *  @throws G enisisDAOE xception
  159            * /
  160           
  161           @T est(expect ed = Genis isDAOExcep tion.class )
  162           pu blic void  testGetUse rDetailsBy Username_S F_NULL() t hrows Geni sisDAOExce ption {
  163  
  164                    LOGG ER.info("* *********J unit Get U serDetails ByUsername ********** ");
  165                    setS essionFact ory_Null() ;
  166                     userManage mentDao_SF _NULL.getU serDetails ByUsername (" DN S      FRANCISS") ;
  167  
  168           }
  169  
  170           /* *
  171            *  Test getU serCountOn Role.
  172            *  
  173            *  @throws G enisisDAOE xception
  174            * /
  175  
  176           @T est
  177           pu blic void  testGetUse rCountOnRo le() throw s GenisisD AOExceptio n {
  178  
  179                    LOGG ER.info("* *********J unit test  Get UserCo untOnRole* *********" );
  180                    List <UserCount > listUser Count = us erManageme ntDao.getU serCountOn Role();
  181                    asse rtNotNull( listUserCo unt);
  182  
  183           }
  184           
  185           /* *
  186            *  Test getU serCountOn Role.
  187            *  
  188            *  @throws G enisisDAOE xception
  189            * /
  190  
  191           @T est(expect ed = Genis isDAOExcep tion.class )
  192           pu blic void  testGetUse rCountOnRo le_SF_NULL () throws  GenisisDAO Exception  {
  193  
  194                    LOGG ER.info("* *********J unit test  Get UserCo untOnRole* *********" );
  195                    setS essionFact ory_Null() ;
  196                    user Management Dao_SF_NUL L.getUserC ountOnRole ();
  197  
  198           }
  199  
  200           /* *
  201            *  Test getU serDetails ByRoleType Id.
  202            *  
  203            *  @throws G enisisDAOE xception
  204            * /
  205  
  206           @T est
  207           pu blic void  getUserDet ailsByRole TypeId() t hrows Geni sisDAOExce ption {
  208  
  209                    LOGG ER.info("* *********J unit test  Get getUse rsList**** ******");
  210                    List <User> lis tUserCount  = userMan agementDao .getUserDe tailsByRol eTypeId(2) ;
  211                    asse rtNotNull( listUserCo unt);
  212  
  213           }
  214           
  215           /* *
  216            *  Test getU serDetails ByRoleType Id.
  217            *  
  218            *  @throws G enisisDAOE xception
  219            * /
  220  
  221           @T est(expect ed = Genis isDAOExcep tion.class )
  222           pu blic void  getUserDet ailsByRole TypeId_SF_ NULL() thr ows Genisi sDAOExcept ion {
  223  
  224                    LOGG ER.info("* *********J unit test  Get getUse rsList**** ******");
  225                    setS essionFact ory_Null() ;
  226                    user Management Dao_SF_NUL L.getUserD etailsByRo leTypeId(2 );
  227  
  228           }
  229           
  230           /* *
  231            *  Test getA llUsers.
  232            *  
  233            *  @throws G enisisDAOE xception
  234            * /
  235  
  236           @T est
  237           pu blic void  testGetAll Users() th rows Genis isDAOExcep tion {
  238  
  239                    LOGG ER.info("* *********J unit test  Get getAll Users***** *****");
  240                    List <User> lis tUser = us erManageme ntDao.getA llUsers();
  241                    asse rtNotNull( listUser);
  242  
  243           }
  244           
  245           /* *
  246            *  Test getA llUsers.
  247            *  
  248            *  @throws G enisisDAOE xception
  249            * /
  250  
  251           @T est(expect ed = Genis isDAOExcep tion.class )
  252           pu blic void  getAllUser s_SF_NULL( ) throws G enisisDAOE xception {
  253  
  254                    LOGG ER.info("* *********J unit test  Get All Us ers******* ***");
  255                    setS essionFact ory_Null() ;
  256                    user Management Dao_SF_NUL L.getAllUs ers();
  257  
  258           }
  259           
  260           /* *
  261            *  Test save OrUpdate.
  262            *  
  263            *  @throws G enisisDAOE xception
  264            * /
  265  
  266           @T est(expect ed = Genis isDAOExcep tion.class )
  267           pu blic void  testSaveOr Update_Nul l() throws  GenisisDA OException  {
  268  
  269                    LOGG ER.info("* *********J unit test  Get saveOr Update**** ******");
  270                    user Management Dao.saveOr Update(nul l);
  271  
  272           }
  273           
  274           /* *
  275            *  Test save OrUpdate.
  276            *  
  277            *  @throws G enisisDAOE xception
  278            * /
  279  
  280           @T est
  281           pu blic void  testSaveOr Update() t hrows Geni sisDAOExce ption {
  282                    
  283                    LOGG ER.info("* *********J unit test  Get saveOr Update**** ******");
  284                    User  user2 = u serManagem entDao.sav eOrUpdate( Helper.get UserLdap() );
  285                    asse rtNotNull( user2);
  286  
  287           }
  288           
  289           /* *
  290            *  Test Save OrUpdate.
  291            *  
  292            *  @throws G enisisDAOE xception
  293            * /
  294  
  295           @T est(expect ed = Genis isDAOExcep tion.class )
  296           pu blic void  saveOrUpda te_SF_NULL () throws  GenisisDAO Exception  {
  297  
  298                    LOGG ER.info("* *********J unit test  SaveOrUpda te******** **");
  299                    setS essionFact ory_Null() ;
  300                    user Management Dao_SF_NUL L.saveOrUp date(new U ser());
  301  
  302           }
  303           
  304           
  305           pr ivate void  setSessio nFactory_N ull() {
  306                    user Management Dao_SF_NUL L = new Us erManageme ntDao();
  307           // TODO  user Management Dao_SF_NUL L.setSessi onFactory( null);
  308           }
  309  
  310   }