public async Task And_Account_Id_Greater_Than_Zero_Then_Valid( GetAccountReservationStatusQuery query, GetAccountReservationStatusQueryValidator validator) { var result = await validator.ValidateAsync(query); result.IsValid().Should().BeTrue(); }
public async Task And_No_Account_Id_Then_Invalid( GetAccountReservationStatusQuery query, GetAccountReservationStatusQueryValidator validator) { query.AccountId = default(long); var result = await validator.ValidateAsync(query); result.IsValid().Should().BeFalse(); result.ValidationDictionary.Keys.Should().Contain(nameof(query.AccountId)); }