Ejemplo n.º 1
0
        public async void GetAllExperiences()
        {
            // arrange
            mockRepo.Setup(x => x.GetAllAsync(It.IsAny <ExperienceRequestParametersDto>())).ReturnsAsync(GetAllAsyncTest);

            // act
            var req    = new ExperienceRequestParametersDto();
            var result = await controller.GetAllExperiences(req);

            // assert
            var resultValue   = Assert.IsAssignableFrom <OkObjectResult>(result);
            var returnedItems = Assert.IsType <List <ViewExperienceDto> >(resultValue.Value);

            Assert.Equal(2, returnedItems.Count);
        }