public async Task Should_Create_New_Task_With_Title()
        {
            await _taskAppService.Create(new CreateTaskInput { Title = "Nowy", Description = "Opis", AssignedPersonId = 1 });

            UsingDbContext(context =>
            {
                var task1 = context.Tasks.FirstOrDefault(t => t.Title == "Nowy");
                task1.ShouldNotBeNull();
            });
        }
Esempio n. 2
0
        public async System.Threading.Tasks.Task Should_Create_New_Task_With_Title()
        {
            await _taskAppService.Create(new CreateTaskInput
            {
                Title = "Newly created task #1"
            });

            var task = await UsingDbContext(context => context.Tasks.FirstOrDefaultAsync(o => o.Title == "Newly created task #1"));

            task.ShouldNotBeNull();
        }
Esempio n. 3
0
        public async System.Threading.Tasks.Task Should_Create_New_Task_With_Title()
        {
            await _taskAppService.Create(new DTO.CreateTaskInput
            {
                Title = "Newly created task #1"
            });

            UsingDbContext(context =>
            {
                var task1 = context.Tasks.FirstOrDefault(t => t.Title == "Newly created task #1");
                task1.ShouldNotBeNull();
            });
        }
 public IActionResult Create(CreateTaskInput item)
 {
     _taskAppService.Create(item);
     return(Success());
 }
Esempio n. 5
0
 public void Create([FromBody] CreateTaskInput input)
 {
     var output = _taskAppService.Create(input);
 }
Esempio n. 6
0
        public async Task <IActionResult> Create([FromBody] CreateTaskInputModel inputModel)
        {
            await _taskAppService.Create(inputModel);

            return(Response());
        }
Esempio n. 7
0
 public IActionResult Add(TaskVm taskVm)
 {
     _taskAppService.Create(taskVm);
     return(RedirectToAction("Index"));
 }