Esempio n. 1
0
        public async Task <AccountingCategory> GetTestData()
        {
            var data = GetNewData();

            await Service.CreateModel(data);

            return(data);
        }
Esempio n. 2
0
        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);
        }