예제 #1
0
        public async Task ChangeRoleUseCaseNotNullInput()
        {
            var output  = new Mock <ChangeRolePresenter>().Object;
            var useCase = new ChangeRoleUseCase(
                userRepository,
                output);
            await useCase.Execute(new ChangeRoleInput(1, new int[] { }));

            Assert.NotNull(output);
            Assert.True(output.ViewModel is NotFoundObjectResult);
        }
예제 #2
0
        public async Task ChangeRoleUseCaseNullInput()
        {
            var output  = new Mock <ChangeRolePresenter>().Object;
            var useCase = new ChangeRoleUseCase(
                userRepository,
                output);
            await useCase.Execute(null);

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