Beispiel #1
0
        public async Task CreateEducationalCourseUseCaseNotNullInput()
        {
            var output  = new Mock <CreateEducationalCoursePresenter>().Object;
            var useCase = new CreateEducationalCourseUseCase(
                semesterRepository,
                output);
            await useCase.Execute(new CreateEducationalCourseInput(new Domain.Entities.User(), ""));

            Assert.NotNull(output);
            Assert.True(output.ViewModel is OkObjectResult);
        }
Beispiel #2
0
        public async Task CreateEducationalCourseUseCaseNullInput()
        {
            var output  = new Mock <CreateEducationalCoursePresenter>().Object;
            var useCase = new CreateEducationalCourseUseCase(
                semesterRepository,
                output);
            await useCase.Execute(null);

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