Beispiel #1
0
        public async Task CustomerIdCannotBeNull()
        {
            var validator = new GetCurrentAccountTransactionHistoryParameterValidator();
            GetCurrentAccountTransactionHistoryQuery command = new GetCurrentAccountTransactionHistoryQuery()
            {
                CustomerId = 1,
                PageNumber = 1,
                PageSize   = 5
            };

            validator.Validate(command).IsValid.Should().BeFalse();
        }
Beispiel #2
0
        public async Task ValidationPasses()
        {
            var validator = new GetCurrentAccountTransactionHistoryParameterValidator();
            GetCurrentAccountTransactionHistoryQuery command = new GetCurrentAccountTransactionHistoryQuery()
            {
                AccountId  = 1,
                CustomerId = 1,
                PageNumber = 1,
                PageSize   = 5
            };

            validator.Validate(command).IsValid.Should().BeTrue();
        }
Beispiel #3
0
        public async Task AccountIdMustBeGreaterThanZero()
        {
            var validator = new GetCurrentAccountTransactionHistoryParameterValidator();
            GetCurrentAccountTransactionHistoryQuery command = new GetCurrentAccountTransactionHistoryQuery()
            {
                AccountId  = 0,
                CustomerId = 1,
                PageNumber = 1,
                PageSize   = 5
            };

            validator.Validate(command).IsValid.Should().BeFalse();
        }