Esempio n. 1
0
        public async Task GetDateWiseVolunteersCount_WhenYearsIsNotZero_ShouldReturnDesignationWiseVolunteersByYear()
        {
            //Arrange
            var dict = new Dictionary <DateTime, List <int> >();

            dict.Add(new DateTime(), new List <int> {
                15, 20
            });
            _enrollmentProcessorMock.Setup(p => p.GetDateWiseVolunteersCount(null)).ReturnsAsync(dict);
            var controller = new EnrollmentController(_enrollmentProcessorMock.Object);

            //Act
            var response = await controller.GetDateWiseVolunteersCount();

            //Assert
            var okResult    = Assert.IsType <OkObjectResult>(response);
            var returnValue = Assert.IsType <Dictionary <DateTime, List <int> > >(okResult.Value);

            Assert.NotEmpty(returnValue);
        }