コード例 #1
0
        public void UpdatedAccountCharge()
        {
            var request = new AccountChargeRequest
            {
                Id            = Guid.NewGuid(),
                Name          = "1000",
                AccountNumber = "1000",
                Questions     = new[]
                {
                    new AccountChargeQuestion
                    {
                        Question = "Question?",
                        Answer   = "Answer"
                    }
                }
            };

            var account = _sut.GetAccountCharge(request.AccountNumber);

            if (account == null)
            {
                _sut.CreateAccountCharge(request);
            }

            request.Id   = account.Id;
            request.Name = "VIP2";

            _sut.UpdateAccountCharge(request);

            account = _sut.GetAccountCharge(request.AccountNumber);

            Assert.AreEqual(account.Name, request.Name);
        }