Example #1
0
        public void Can_not_approve_rejected_online_deposit()
        {
            //Arrange
            var deposit = _paymentTestHelper.CreateOnlineDeposit(_testPlayer.Id, 300);

            _paymentTestHelper.RejectOnlineDeposit(deposit.Id);

            var request = new ApproveOnlineDepositRequest
            {
                Id      = deposit.Id,
                Remarks = "remark"
            };

            //Act
            //Assert
            Assert.Throws <RegoException>(() => _depositCommands.Approve(request))
            .Message.Should().Be("The deposit has 'Rejected' status, so it can't be Approved");
        }