Beispiel #1
0
        public async Task UpdateDepartmentNotNullInput()
        {
            var output  = new Mock <UpdateDepartmentPresenter>().Object;
            var useCase = new UpdateDepartmentUseCase(
                output,
                departmentRepository);
            await useCase.Execute(new UpdateDepartmentInput(new Domain.Entities.Department()));

            Assert.NotNull(output);
            Assert.True(output.ViewModel is NotFoundResult);
        }
Beispiel #2
0
        public async Task UpdateDepartmentNullInput()
        {
            var output  = new Mock <UpdateDepartmentPresenter>().Object;
            var useCase = new UpdateDepartmentUseCase(
                output,
                departmentRepository);
            await useCase.Execute(null);

            Assert.NotNull(output);
            Assert.True(output.ViewModel is BadRequestObjectResult);
        }