public void MapToProperty_UmbracoInfoType_GetsExpectedValueFromUmbraco(
            [Values(
                //UmbracoInfoType.Url,
                UmbracoInfoType.ContentTypeAlias,
                UmbracoInfoType.ContentTypeName,
                UmbracoInfoType.Name,
                UmbracoInfoType.Creator
                )] UmbracoInfoType type,
            [Values(
                //"target", //Url
                "TestType", //ContentTypeAlias
                "Test Type", //ContentTypeName
                "Target", //Name
                "admin" //Creator
                )] object expected
            )
        {
            //Assign
            var mapper = new UmbracoInfoMapper();
            var config = new UmbracoInfoConfiguration();
            config.Type = type;
            mapper.Setup(new DataMapperResolverArgs(null, config));

            var contentService = new ContentService(_unitOfWork, _repoFactory);
            var content = contentService.GetById(new Guid("{FB6A8073-48B4-4B85-B80C-09CBDECC27C9}"));

            Assert.IsNotNull(content, "Content is null, check in Umbraco that item exists");
            var dataContext = new UmbracoDataMappingContext(null, content, null);

            //Act
            var value = mapper.MapToProperty(dataContext);
            Console.WriteLine(type);

            //Assert
            Assert.AreEqual(expected, value);
        }
        public void MapToProperty_UmbracoInfoTypeNotSet_ThrowsException()
        {
            //Assign
            UmbracoInfoType type = UmbracoInfoType.NotSet;

            var mapper = new UmbracoInfoMapper();
            var config = new UmbracoInfoConfiguration();
            config.Type = type;
            mapper.Setup(new DataMapperResolverArgs(null, config));

            var contentService = new ContentService(_unitOfWork, _repoFactory);
            var content = contentService.GetById(new Guid("{FB6A8073-48B4-4B85-B80C-09CBDECC27C9}"));

            Assert.IsNotNull(content, "Content is null, check in Umbraco that item exists");
            var dataContext = new UmbracoDataMappingContext(null, content, null);

            //Act
            var value = mapper.MapToProperty(dataContext);

            //Assert
            //No asserts expect exception
        }
        public void MapToProperty_UmbracoInfoTypeUpdateDate_ReturnsUpdateDateAsDateTime()
        {
            //Assign
            var type = UmbracoInfoType.UpdateDate;

            var mapper = new UmbracoInfoMapper();
            var config = new UmbracoInfoConfiguration();
            config.Type = type;
            mapper.Setup(new DataMapperResolverArgs(null, config));

            var contentService = new ContentService(_unitOfWork, _repoFactory);
            var content = contentService.GetById(new Guid("{FB6A8073-48B4-4B85-B80C-09CBDECC27C9}"));
            var expected = content.UpdateDate;

            Assert.IsNotNull(content, "Content is null, check in Umbraco that item exists");
            var dataContext = new UmbracoDataMappingContext(null, content, null);

            //Act
            var value = mapper.MapToProperty(dataContext);

            //Assert
            Assert.AreEqual(expected, value);
        }