public async Task with_non_duplicated_person_CreateBankInfo_should_return_new_SSG_Asset_BankingInformation() { _testBankInfoId = Guid.NewGuid(); _odataClientMock.Setup(x => x.For <SSG_Asset_BankingInformation>(null).Set(It.Is <BankingInformationEntity>(x => x.AccountNumber == "normal")) .InsertEntryAsync(It.IsAny <CancellationToken>())) .Returns(Task.FromResult(new SSG_Asset_BankingInformation() { AccountNumber = "normal", BankingInformationId = _testBankInfoId }) ); var bankInfo = new SSG_Asset_BankingInformation() { AccountNumber = "normal", Person = new SSG_Person() { IsDuplicated = false } }; var result = await _sut.CreateBankInfo(bankInfo, CancellationToken.None); Assert.AreEqual("normal", result.AccountNumber); Assert.AreEqual(_testBankInfoId, result.BankingInformationId); }
public async Task with_correct_searchRequestid_upload_bank_info_should_success() { var bankInfo = new SSG_Asset_BankingInformation() { BankName = "bank", TransitNumber = "123456", AccountNumber = "123456", Branch = "branch", Notes = "notes", Date1 = new DateTime(2001, 1, 1), Date1Label = "date1lable", Date2 = new DateTime(2005, 1, 1), Date2Label = "date2lable", SearchRequest = new SSG_SearchRequest() { SearchRequestId = testId }, Person = new SSG_Person() { PersonId = testPersonId } }; var result = await _sut.CreateBankInfo(bankInfo, CancellationToken.None); Assert.AreEqual("bank", result.BankName); }