コード例 #1
0
 public void TestMissingUserName()
 {
     UserNameAuthentication authentication = new UserNameAuthentication("janedoe");
     LoginRequest credentials = new LoginRequest();
     bool isValid = authentication.Authenticate(credentials);
     Assert.IsFalse(isValid);
 }
コード例 #2
0
 public void TestValidUserName()
 {
     UserNameAuthentication authentication = new UserNameAuthentication("johndoe");
     LoginRequest credentials = new LoginRequest("johndoe");
     bool isValid = authentication.Authenticate(credentials);
     Assert.IsTrue(isValid);
 }