コード例 #1
0
        public void Can_not_approve_approved_online_deposit()
        {
            //Arrange
            var deposit = _paymentTestHelper.CreateOnlineDeposit(_testPlayer.Id, 300);

            _paymentTestHelper.VerifyOnlineDeposit(deposit.Id);
            _paymentTestHelper.ApproveOnlineDeposit(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 'Approved' status, so it can't be Approved");
        }