public void Configure_ConfigureCalled_SitecoreLinkedConfigurationReturned() { //Assign SitecoreLinkedAttribute attr = new SitecoreLinkedAttribute(); var propertyInfo = typeof(StubClass).GetProperty("DummyProperty"); //Act var result = attr.Configure(propertyInfo) as SitecoreLinkedConfiguration; //Assert Assert.IsNotNull(result); Assert.AreEqual(SitecoreLinkedOptions.All, result.Option); }
public void Configure_OptionSet_OptionSetOnConfiguration() { //Assign SitecoreLinkedAttribute attr = new SitecoreLinkedAttribute(); var propertyInfo = typeof(StubClass).GetProperty("DummyProperty"); attr.Option = SitecoreLinkedOptions.Referrers; //Act var result = attr.Configure(propertyInfo) as SitecoreLinkedConfiguration; //Assert Assert.IsNotNull(result); Assert.AreEqual(SitecoreLinkedOptions.Referrers, result.Option); }