Пример #1
0
        public async Task CreateFacultyUseCaseNotNullInput()
        {
            var output  = new Mock <CreateFacultyPresenter>().Object;
            var useCase = new CreateFacultyUseCase(
                facultyRepository,
                output);
            await useCase.Execute(new CreateFacultyInput("", new Domain.Entities.User(), new Domain.Entities.User()));

            Assert.NotNull(output);
            Assert.True(output.ViewModel is OkObjectResult);
        }
Пример #2
0
        public async Task CreateFacultyUseCaseNullInput()
        {
            var output  = new Mock <CreateFacultyPresenter>().Object;
            var useCase = new CreateFacultyUseCase(
                facultyRepository,
                output);
            await useCase.Execute(null);

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