public void AuthorizeNonExistingAccount_ExpectNotFoundException() { // Arrange var account = new AuthorizeAccountCommand() { Login = "******", Password = "******" }; var query = new AccountByLoginAndPasswordQuery(uow); // Assert Assert.ThrowsAsync <NotFoundException>(async() => await query.Execute(account.Login, account.Password)); }
public async Task AuthorizeExistingAccount_ExpectSuccessResponse() { // Arrange var account = new AuthorizeAccountCommand() { Login = "******", Password = "******" }; var query = new AccountByLoginAndPasswordQuery(uow); // Act var authorizeResult = await query.Execute(account.Login, account.Password); // Assert Assert.NotNull(authorizeResult); }