31. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 1/31/2018 9:02:16 AM Central 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.

31.1 Files compared

# Location File Last Modified
1 NVCC_2.2_01162018.zip\NVCC\NVCC.Repos.UserRepository.Tests UserRepositoryGetUserTests.cs Thu Oct 19 16:36:42 2017 UTC
2 NVCC_2.2_01162018.zip\NVCC\NVCC.Repos.UserRepository.Tests UserRepositoryGetUserTests.cs Mon Jan 29 18:31:29 2018 UTC

31.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 18 286
Changed 17 40
Inserted 0 0
Removed 0 0

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

31.4 Active regular expressions

No regular expressions were active.

31.5 Comparison detail

  1   using NUni t.Framewor k;
  2   using Syst em.Linq;
  3  
  4  
  5   namespace  NVCC.Repos .UserRepos itory.Test s
  6   {
  7       [TestF ixture]
  8       public  class Use rRepositor yGetUserTe sts
  9       {
  10           pr ivate User Repository  userRepos itory;
  11  
  12           [O neTimeSetU p]
  13           pu blic void  SetUp()
  14           {
  15                userRepo sitory = n ew UserRep ository(ne w UserCont ext());
  16           }
  17  
  18           [T est]
  19             public voi d UserRepo sitoryGetU ser_ U S ER ()
  20           {
  21                // Arran ge
  22                // Act
  23                  var result  = userRep ository.Ge tUser(" DOM A IN \\ U S ER ");
  24                // Asser t
  25                Assert.T hat(result , Is.Not.N ull);
  26                Assert.T hat(result .Name, Is. Not.Null);
  27                Assert.T hat(result .Name, Is. Not.Empty) ;
  28                  Assert.Tha t(result.N ame, Is.Eq ualTo(" F i r s t L a st "));
  29                  Assert.Tha t(result.D omainPlusN etworkUser Name, Is.E qualTo(" DOM A IN \\ U S ER ").IgnoreC ase);
  30                Assert.T hat(result .Facilitie s, Is.Not. Null);
  31                Assert.T hat(result .Facilitie s, Is.Not. Empty);
  32                Assert.T hat(result .Facilitie s.Count, I s.GreaterT han(100));
  33                Assert.T hat(result .Facilitie s.Values.S elect(f =>  f.sta3n),  Has.Some. EqualTo(re sult.Curre ntDefaultF acility));
  34           }
  35  
  36           [T est]
  37             public voi d UserRepo sitoryGetU ser_ U S
E R ()
  38           {
  39                // Arran ge
  40                // Act
  41                  var result  = userRep ository.Ge tUser(" DOM A IN \\ U S
E R ");
  42                // Asser t
  43                Assert.T hat(result , Is.Not.N ull);
  44                Assert.T hat(result .Name, Is. Not.Null);
  45                Assert.T hat(result .Name, Is. Not.Empty) ;
  46                Assert.T hat(result .Name, Is. EqualTo("W ilmer, Eli zabeth"));
  47                  Assert.Tha t(result.D omainPlusN etworkUser Name, Is.E qualTo(" DOM A IN \\ U S
E R ").IgnoreC ase);
  48                Assert.T hat(result .Facilitie s, Is.Not. Null);
  49                Assert.T hat(result .Facilitie s, Is.Empt y);
  50                Assert.T hat(result .CurrentDe faultFacil ity, Is.Eq ualTo((sho rt)0));
  51           }
  52  
  53           [T est]
  54           pu blic void  UserReposi toryGetUse r_VHAMASER _VA_NSOC_E AS_TESTER1 ()
  55           {
  56                // Arran ge
  57                // Act
  58                  var result  = userRep ository.Ge tUser(" DO MA IN \\VA-NSOC- EAS-TESTER 1");
  59                // Asser t
  60                Assert.T hat(result , Is.Not.N ull);
  61                Assert.T hat(result .Name, Is. Not.Null);
  62                Assert.T hat(result .Name, Is. Not.Empty) ;
  63                Assert.T hat(result .Name, Is. EqualTo("T ester1, NS OC").Ignor eCase);
  64                  Assert.Tha t(result.D omainPlusN etworkUser Name, Is.E qualTo(" DO MA IN \\VA-NSOC- EAS-TESTER 1").Ignore Case);
  65                Assert.T hat(result .Facilitie s, Is.Not. Null);
  66                Assert.T hat(result .Facilitie s, Is.Empt y);
  67                Assert.T hat(result .CurrentDe faultFacil ity, Is.Eq ualTo((sho rt)0));
  68           }
  69  
  70           [T est]
  71             public voi d UserRepo sitoryGetU ser_ DO M
A IN_ US E R()
  72           {
  73                // Arran ge
  74                // Act
  75                  var result  = userRep ository.Ge tUser(" DOM A IN \\ USE R");
  76                // Asser t
  77                Assert.T hat(result , Is.Not.N ull);
  78                Assert.T hat(result .Name, Is. Not.Null);
  79                Assert.T hat(result .Name, Is. Not.Empty) ;
  80                  Assert.Tha t(result.N ame, Is.Eq ualTo(" Fir st
L a st "));
  81                  Assert.Tha t(result.D omainPlusN etworkUser Name, Is.E qualTo(" DOM A IN \\ USE R").Ignore Case);
  82                Assert.T hat(result .Facilitie s, Is.Not. Null);
  83                Assert.T hat(result .Facilitie s, Is.Not. Empty);
  84                Assert.T hat(result .Facilitie s.Values.S elect(f =>  f.sta3n),  Has.Some. EqualTo(re sult.Curre ntDefaultF acility));
  85                Assert.T hat(result .CurrentDe faultFacil ity, Is.Eq ualTo((sho rt)544));
  86                Assert.T hat(result .Facilitie s.Contains Key(result .CurrentDe faultFacil ity));
  87                Assert.T hat(result .Facilitie s[result.C urrentDefa ultFacilit y].PHIPII,  Is.True);
  88                Assert.T hat(result .Facilitie s[result.C urrentDefa ultFacilit y].Station Name, Does .Contain(" Columbia") );
  89                Assert.T hat(result .Facilitie s.Count, I s.EqualTo( 1));
  90           }
  91  
  92           [T est]
  93             public voi d UserRepo sitoryGetU ser_ DOM A IN _
U SE R
()
  94           {
  95                // Arran ge
  96                // Act
  97                  var result  = userRep ository.Ge tUser(" DOM A IN \\
U SE R
");
  98                // Asser t
  99                Assert.T hat(result , Is.Not.N ull);
  100                Assert.T hat(result .Name, Is. Not.Null);
  101                Assert.T hat(result .Name, Is. Not.Empty) ;
  102                  Assert.Tha t(result.N ame, Is.Eq ualTo(" F i
r st L a st "));
  103                  Assert.Tha t(result.D omainPlusN etworkUser Name, Is.E qualTo(" DOM A IN \\
U SE R
").IgnoreC ase);
  104                Assert.T hat(result .Facilitie s, Is.Not. Null);
  105                Assert.T hat(result .Facilitie s, Is.Not. Empty);
  106                Assert.T hat(result .Facilitie s.Values.S elect(f =>  f.sta3n),  Has.Some. EqualTo(re sult.Curre ntDefaultF acility));
  107                Assert.T hat(result .CurrentDe faultFacil ity, Is.Eq ualTo((sho rt)528));
  108                Assert.T hat(result .Facilitie s.Contains Key(result .CurrentDe faultFacil ity));
  109                Assert.T hat(result .Facilitie s[result.C urrentDefa ultFacilit y].PHIPII,  Is.True);
  110                Assert.T hat(result .Facilitie s[result.C urrentDefa ultFacilit y].Station Name, Does .Contain(" Upstate Ne w York").I gnoreCase) ;
  111                Assert.T hat(result .Facilitie s.Count, I s.EqualTo( 1));
  112           }
  113  
  114           [T est]
  115             public voi d UserRepo sitoryGetU ser_ DOMAIN _ SERVER ()
  116           {
  117                // Arran ge
  118                // Act
  119                  var result  = userRep ository.Ge tUser(" DOMAIN \\ SERVER ");
  120                // Asser t
  121                Assert.T hat(result , Is.Not.N ull);
  122                Assert.T hat(result .Name, Is. Not.Null);
  123                Assert.T hat(result .Name, Is. Not.Empty) ;
  124                Assert.T hat(result .Name, Is. EqualTo(",  ")); // A rgubly not  the prope r thing
  125                  Assert.Tha t(result.D omainPlusN etworkUser Name, Is.E qualTo(" DOMAIN \\ SERVER ").IgnoreC ase);
  126                Assert.T hat(result .Facilitie s, Is.Not. Null);
  127                Assert.T hat(result .Facilitie s, Is.Not. Empty);
  128                Assert.T hat(result .Facilitie s.Values.S elect(f =>  f.sta3n),  Has.Some. EqualTo(re sult.Curre ntDefaultF acility));
  129                Assert.T hat(result .Facilitie s.Contains Key(result .CurrentDe faultFacil ity));
  130                Assert.T hat(result .Facilitie s[result.C urrentDefa ultFacilit y].PHIPII,  Is.True);
  131                Assert.T hat(result .Facilitie s.Count, I s.EqualTo( 8));
  132           }
  133  
  134           [T est]
  135           pu blic void  UserReposi toryGetUse r_null()
  136           {
  137                var resu lt = userR epository. GetUser(nu ll);
  138                Assert.T hat(result , Is.Null) ;
  139           }
  140  
  141           [T est]
  142           pu blic void  UserReposi toryGetUse r_Username DoesNotExi st()
  143           {
  144                var resu lt = userR epository. GetUser("a ");
  145                Assert.T hat(result , Is.Null) ;
  146           }
  147  
  148           [T est]
  149           pu blic void  UserReposi toryGetUse r_EmptyStr ing()
  150           {
  151                var resu lt = userR epository. GetUser("" );
  152                Assert.T hat(result , Is.Null) ;
  153           }
  154  
  155           [T est]
  156           pu blic void  UserReposi toryGetUse r_SingleSl ash()
  157           {
  158                var resu lt = userR epository. GetUser("\ \");
  159                Assert.T hat(result , Is.Null) ;
  160           }
  161  
  162       }
  163   }