public void CheckLogin_ShouldThrowArgumentNullException_WhenUsernameIsEmpty() { var mapperMock = new Mock <IMappingProvider>(); var hashingMock = new Mock <IHashingPassword>(); var unitOfWorkMock = new Mock <IEfUnitOfWork>(); var repoMock = new Mock <IEfGenericRepository <User> >(); var userContext = new UserContext(mapperMock.Object, hashingMock.Object, unitOfWorkMock.Object, repoMock.Object); Assert.ThrowsException <ArgumentNullException>(() => userContext.CheckLogin("", It.IsAny <string>())); }
public User LoginUser(string username, string password) { return(_userContext.CheckLogin(username, password)); }