public async Task <AccountingCategory> GetTestData() { var data = GetNewData(); await Service.CreateModel(data); return(data); }
public async void Should_Success_Create_Data() { var dbContext = _dbContext(GetCurrentAsyncMethod()); var serviceProviderMock = GetServiceProvider(); serviceProviderMock .Setup(s => s.GetService(typeof(CoreDbContext))) .Returns(dbContext); var service = new AccountingCategoryService(serviceProviderMock.Object); var data = _dataUtil(service).GetNewData(); var Response = await service.CreateModel(data); Assert.NotEqual(0, Response); }