コード例 #1
0
        public async Task IfQuizNull_False()
        {
            var command = new CreateResultCommand(null);
            var handler = new CreateResultHandler(_mock.Object);

            var result = await handler.Handle(command, CancellationToken.None);

            Assert.IsFalse(result);
        }
コード例 #2
0
        public async Task IfIdHasValue_False(string value)
        {
            var command = new CreateResultCommand(new QuizResult {
                _id = value
            });
            var handler = new CreateResultHandler(_mock.Object);

            var result = await handler.Handle(command, CancellationToken.None);

            Assert.IsFalse(result);
        }
コード例 #3
0
        public async Task ResultIdNullOrEmpty_True(string value)
        {
            var command = new CreateResultCommand(new QuizResult {
                _id = value
            });
            var handler = new CreateResultHandler(_mock.Object);

            var result = await handler.Handle(command, CancellationToken.None);

            Assert.IsTrue(result);
        }