コード例 #1
0
        public async Task GetPoll_ShouldNotFindPoll()
        {
            // Arrange
            CreatePoll();

            // Act
            var result = await _pollController.GetPoll(int.MaxValue);

            // Assert
            Assert.IsInstanceOfType(result.Result, typeof(NotFoundResult));
        }
コード例 #2
0
        public void GetPoll_ShouldReturnCorrectPoll()
        {
            var controller = new PollController(GetTestPoll());

            var result = controller.GetPoll(2);

            Assert.IsInstanceOfType(result, typeof(DbQuery <ActivityDTO>));
        }