public void SetUp() { authenticationMock = mocks.Create <IAuthentication>().Object; Mock.Get(authenticationMock).SetupGet(_authenticationMock => _authenticationMock.Identifier).Returns("johndoe"); sessionMock = mocks.Create <ISessionCache>().Object; manager = new InternalSecurityManager(); manager.Users = new IAuthentication[] { authenticationMock }; manager.SessionCache = sessionMock; }
public void SetUp() { authenticationMock = mocks.DynamicMock <IAuthentication>(); SetupResult.For(authenticationMock.Identifier).Return("johndoe"); sessionMock = mocks.DynamicMock <ISessionCache>(); manager = new InternalSecurityManager(); manager.Users = new IAuthentication[] { authenticationMock }; manager.SessionCache = sessionMock; }