public async Task <MemoModel> GetCreatedData()
        {
            var model = GetMemoModelToCreate();
            await _service.CreateAsync(model);

            return(await _service.ReadByIdAsync(model.Id));
        }
Exemplo n.º 2
0
        public async Task <StatusCodeResult> Create(MemoModel model)
        {
            await _memoService.CreateAsync(model.DistributionGroups, model.Subject, model.Date, model.To,
                                           model.Description);

            return(new StatusCodeResult(StatusCodes.Status201Created));
        }
        public async Task Should_Success_Create_Model_SalesInvoice()
        {
            var dbContext           = GetDbContext(GetCurrentMethod());
            var serviceProviderMock = GetServiceProviderMock();
            var service             = new MemoService(dbContext, serviceProviderMock.Object);
            var dataUtil            = new MemoDataUtil(service);
            var modelToCreate       = dataUtil.GetMemoModelToCreate_SalesInvoice();
            var result = await service.CreateAsync(modelToCreate);

            Assert.NotEqual(0, result);
        }
Exemplo n.º 4
0
        public async Task <StatusCodeResult> Create(MemoModel model)
        {
            await _memoService.CreateAsync(model);

            return(new StatusCodeResult(StatusCodes.Status201Created));
        }