Example #1
0
        public async Task GetDesignationWiseVolunteersCount_WhenEnrollmentsExist_ShouldReturnDesignationWiseVolunteersCount()
        {
            //Arrange
            var dict = new Dictionary <string, int>();

            dict.Add("key", 15);
            _enrollmentProcessorMock.Setup(p => p.GetDesignationWiseVolunteersCount(null)).ReturnsAsync(dict);
            var controller = new EnrollmentController(_enrollmentProcessorMock.Object);

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

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

            Assert.NotEmpty(returnValue);
        }