public void ConfigureHandler_SetIsLazy_True() { //Assign SitecoreFieldAttribute attr = new SitecoreFieldAttribute(); SitecoreProperty property = new SitecoreProperty() { Attribute = attr, Property = new FakePropertyInfo(typeof(string))//this can be anything }; //Act _handler.ConfigureDataHandler(property); //Assert Assert.IsTrue(_handler.IsLazy); }
public void ConfigureHandler_SetIsLazy_False() { //Assign SitecoreFieldAttribute attr = new SitecoreFieldAttribute(); attr.Setting = SitecoreFieldSettings.DontLoadLazily; SitecoreProperty property = new SitecoreProperty() { Attribute = attr, Property = new FakePropertyInfo(typeof(string))//this can be anything }; //Act _handler.ConfigureDataHandler(property); //Assert Assert.IsFalse(_handler.IsLazy); }