コード例 #1
0
 public void AssignSessionTest()
 {
     var target = new MockSessionProvider();
     string errorMessage = string.Empty;
     string errorMessageExpected = string.Empty;
     bool expected = true;
     bool actual;
     actual = target.AssignSession(sessionId, authenticationId, out errorMessage);
     Assert.AreEqual(errorMessageExpected, errorMessage);
     Assert.AreEqual(expected, actual);
 }
コード例 #2
0
 public void CreateSessionTest()
 {
     if (string.IsNullOrEmpty(sessionId))
     {
         var target = new MockSessionProvider();
         var session = new SessionData();
         string actual;
         actual = target.CreateSession(session);
         Assert.IsNotNull(actual);
         sessionId = actual;
     }
 }
コード例 #3
0
 public void GetSessionTest()
 {
     try
     {
         AssignSessionTest();
     }
     catch
     {
     }
     var target = new MockSessionProvider();
     string errorMessage = string.Empty;
     string errorMessageExpected = string.Empty;
     SessionData actual;
     actual = target.GetSession(authenticationId, sessionId, out errorMessage);
     Assert.AreEqual(errorMessageExpected, errorMessage);
     Assert.IsNotNull(actual);
 }
コード例 #4
0
 public void MockSessionProviderConstructorTest()
 {
     var target = new MockSessionProvider();
 }
コード例 #5
0
 public void UpdateSessionTest()
 {
     try
     {
         AssignSessionTest();
     }
     catch
     {
     }
     var target = new MockSessionProvider();
     var sessionData = new SessionData();
     string errorMessage = string.Empty;
     string errorMessageExpected = string.Empty;
     bool expected = true;
     bool actual;
     actual = target.UpdateSession(sessionId, authenticationId, sessionData, out errorMessage);
     Assert.AreEqual(errorMessageExpected, errorMessage);
     Assert.AreEqual(expected, actual);
 }