Example #1
0
        public void ValidateSessionReturnsTrueForAValidSession()
        {
            Mock.Get(sessionMock).Setup(_sessionMock => _sessionMock.RetrieveFromCache(testSessionToken)).Returns("johndoe").Verifiable();

            manager.Initialise();

            bool result = manager.ValidateSession(testSessionToken);

            Assert.IsTrue(result);
        }
        public void ValidateSessionReturnsTrueForAValidSession()
        {
            Expect.Call(sessionMock.RetrieveFromCache(testSessionToken)).Return("johndoe");

            mocks.ReplayAll();
            manager.Initialise();

            bool result = manager.ValidateSession(testSessionToken);

            Assert.IsTrue(result);
        }