public void GetDisplayNameReturnsDisplayNameForAValidSession() { Mock.Get(sessionMock).Setup(_sessionMock => _sessionMock.RetrieveSessionValue(testSessionToken, "DisplayName")).Returns("John Doe").Verifiable(); manager.Initialise(); string result = manager.GetDisplayName(testSessionToken, null); Assert.AreEqual("John Doe", result); }
public void GetDisplayNameReturnsDisplayNameForAValidSession() { Expect.Call(sessionMock.RetrieveSessionValue(testSessionToken, "DisplayName")).Return("John Doe"); mocks.ReplayAll(); manager.Initialise(); string result = manager.GetDisplayName(testSessionToken, null); Assert.AreEqual("John Doe", result); }