public void Given_I_have_made_valid_changes_to_an_existing_ToDo()
 {
     _existingItem = new MasterTradingAgreementBuilder().Persist();
     _request      = _existingItem
                     .Adapt <UpdateMasterTradingAgreementRequest>()
                     .With(x => x.Comments  = UpdatedValue);
     _request.ContractSchedules[0].Comments = UpdatedValue;
 }
        public void Given_I_have_made_invalid_changes_to_an_existing_item()
        {
            _existingItem = new MasterTradingAgreementBuilder().Persist();

            _request = _existingItem
                       .Adapt <UpdateMasterTradingAgreementRequest>()
                       .With(x => x.Id       = _existingItem.Id)
                       .With(x => x.Name     = string.Empty)
                       .With(x => x.Comments = "Updated");
        }
        public async Task <IActionResult> Update(UpdateMasterTradingAgreementRequest request)
        {
            var result = await Send <UpdateMasterTradingAgreementCommand>(request);

            return(result.ToUpdatedResult());
        }
 public void Given_I_am_trying_to_edit_an_item_that_does_not_exist()
 {
     _request = new MasterTradingAgreementBuilder().Build()
                .Adapt <UpdateMasterTradingAgreementRequest>();
 }