public void TestCorrectLogin() { // Setup IUsersService service = new UsersServiceFake(); IAuthenticationManager manager = AuthenticationManager.GetInstance(service); // Action manager.Login("123", "123456"); // Assertion Assert.IsTrue(manager.IsAuthenticated()); }
public void TestFaildLogin() { // Setup IUsersService service = new UsersServiceFake(); IAuthenticationManager manager = AuthenticationManager.GetInstance(service); // Action manager.Login("*****@*****.**", "123"); // Assertion Assert.IsFalse(manager.IsAuthenticated()); }
public UsersControllerTests() { _service = new UsersServiceFake(); _controller = new UsersController(_service); }