public void Configure_ConfigureCalled_SitecoreQueryConfigurationReturned()
        {
            //Assign
            SitecoreFieldAttribute attr = new SitecoreFieldAttribute(string.Empty);
            var propertyInfo = typeof(StubClass).GetProperty("DummyProperty");


            //Act
            var result = attr.Configure(propertyInfo) as SitecoreFieldConfiguration;

            //Assert
            Assert.IsNotNull(result);
        }
        public void Configure_SettingSetToDontLoadLazily_SettingsReturnAsDontLoadLazily()
        {
            //Assign
            SitecoreFieldAttribute attr = new SitecoreFieldAttribute(string.Empty);
            var propertyInfo = typeof(StubClass).GetProperty("DummyProperty");
            
            attr.Setting = SitecoreFieldSettings.DontLoadLazily;

            //Act
            var result = attr.Configure(propertyInfo) as SitecoreFieldConfiguration;

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(SitecoreFieldSettings.DontLoadLazily, result.Setting);
        }
        public void Configure_SettingIsUnversioned_IsUnversionedIsSetOnConfiguration(
            [Values(true, false)] bool value,
            [Values(true, false)] bool expected)
        {
            //Assign
            SitecoreFieldAttribute attr = new SitecoreFieldAttribute(string.Empty);
            var propertyInfo = typeof(StubClass).GetProperty("DummyProperty");

            attr.IsUnversioned = value;

            //Act
            var result = attr.Configure(propertyInfo) as SitecoreFieldConfiguration;

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(expected, result.IsUnversioned);
        }
        public void Configure_SettingFieldSource_FieldSourceIsSetOnConfiguration(
            [Values("field Source")] string value,
            [Values("field Source")] string expected)
        {
            //Assign
            SitecoreFieldAttribute attr = new SitecoreFieldAttribute(string.Empty);
            var propertyInfo = typeof(StubClass).GetProperty("DummyProperty");

            attr.FieldSource = value;

            //Act
            var result = attr.Configure(propertyInfo) as SitecoreFieldConfiguration;

            //Assert
            Assert.IsNotNull(result);
            Assert.AreEqual(expected, result.FieldSource);
        }