コード例 #1
0
        public async Task GetStats_ShouldReturnCorrectStats()
        {
            // Arrange
            var expected = CreatePoll();

            // Act
            var result = await _pollController.GetStats(expected.Id);

            // Assert
            Assert.IsInstanceOfType(result.Result, typeof(OkObjectResult));
            Assert.AreEqual(_mapper.Map <StatGetVM>(expected), ((OkObjectResult)result.Result).Value);
        }