public void GetTouristSpotByCategoriesAndRegionIdNotFoundTest()
        {
            var touristSpotMock = new Mock <ITouristSpotManagement>(MockBehavior.Strict);

            touristSpotMock.Setup(m => m.GetTouristSpotsByCategoriesAndRegion(It.IsAny <List <Guid> >(), It.IsAny <Guid>()))
            .Throws(new ClientBusinessLogicException());
            TouristSpotController touristSpotController = new TouristSpotController(touristSpotMock.Object);

            Guid[] categories    = new Guid[] { category.Id };
            var    result        = touristSpotController.GetTouristSpotsByCategoriesAndRegionId(categories, regionForTouristSpot.Id);
            var    createdResult = result as NotFoundObjectResult;

            touristSpotMock.VerifyAll();
            Assert.AreEqual(404, createdResult.StatusCode);
        }
        public void GetTouristSpotByCategoriesAndRegionIdInternalErrorTest()
        {
            var touristSpotMock = new Mock <ITouristSpotManagement>(MockBehavior.Strict);

            touristSpotMock.Setup(m => m.GetTouristSpotsByCategoriesAndRegion(It.IsAny <List <Guid> >(), It.IsAny <Guid>()))
            .Throws(new ServerBusinessLogicException("No se puede obtener los puntos turisticos que se estan buscando por dichas categorias y region."));
            TouristSpotController touristSpotController = new TouristSpotController(touristSpotMock.Object);

            Guid[] categories    = new Guid[] { category.Id };
            var    result        = touristSpotController.GetTouristSpotsByCategoriesAndRegionId(categories, regionForTouristSpot.Id);
            var    createdResult = result as ObjectResult;

            touristSpotMock.VerifyAll();
            Assert.AreEqual(500, createdResult.StatusCode);
        }
        public void GetTouristSpotByCategoriesAndRegionIdOkTest()
        {
            var touristSpotMock = new Mock <ITouristSpotManagement>(MockBehavior.Strict);

            touristSpotMock.Setup(m => m.GetTouristSpotsByCategoriesAndRegion(It.IsAny <List <Guid> >(), It.IsAny <Guid>())).Returns(new List <TouristSpot> {
                touristSpotAdded
            });
            TouristSpotController touristSpotController = new TouristSpotController(touristSpotMock.Object);

            Guid[] categories    = new Guid[] { category.Id };
            var    result        = touristSpotController.GetTouristSpotsByCategoriesAndRegionId(categories, regionForTouristSpot.Id);
            var    createdResult = result as OkObjectResult;
            var    model         = createdResult.Value as List <TouristSpotForResponseModel>;

            touristSpotMock.VerifyAll();
            Assert.AreEqual(touristSpotResponseModel, model.First());
        }