public async Task <DownPaymentModel> GetTestDataById() { DownPaymentModel model = GetNewData(); await Service.CreateAsync(model); return(await Service.ReadByIdAsync(model.Id)); }
public async Task Should_Success_Create_Model() { var dbContext = GetDbContext(GetCurrentMethod()); var serviceProviderMock = GetServiceProviderMock(); var service = new DownPaymentService(dbContext, serviceProviderMock.Object); var dataUtil = new DownPaymentDataUtil(service); var modelToCreate = dataUtil.GetNewData(); var result = await service.CreateAsync(modelToCreate); Assert.NotEqual(0, result); }