public static SitecoreType <ProtectedModel> Load() { var config = new SitecoreType <ProtectedModel>(); config.Field(x => x.Field1); config.Field(x => x.Field2); return(config); }
public static SitecoreType <PrivateModelRecursive> Load() { var config = new SitecoreType <PrivateModelRecursive>(); config.Field(x => x.Field1); return(config); }
public void Import_ImportTypeFieldDefinedTwice_DoesNotThrowException() { //Arrange var type1 = new SitecoreType<Stub1>(); type1.Field(x => x.Field1); var type2 = new SitecoreType<Stub2>(); type2.Field(x => x.Field1); type2.Field(x => x.Field2); //Act type2.Import(type1); //Assert Assert.AreEqual(2, type2.Config.Properties.Count()); }
public void Import_ImportTypeFieldDefinedTwice_DoesNotThrowException() { //Arrange var type1 = new SitecoreType <Stub1>(); type1.Field(x => x.Field1); var type2 = new SitecoreType <Stub2>(); type2.Field(x => x.Field1); type2.Field(x => x.Field2); //Act type2.Import(type1); //Assert Assert.AreEqual(2, type2.Config.Properties.Count()); }
public void Import_ImportType_AddsPropertiesToNewType() { //Arrange var type1 = new SitecoreType<Stub1>(); type1.Field(x => x.Field1); var type2 = new SitecoreType<Stub2>(); type2.Field(x => x.Field2); //Act type2.Import(type1); //Assert Assert.AreEqual(2, type2.Config.Properties.Count()); }
public void Import_ImportType_AddsPropertiesToNewType() { //Arrange var type1 = new SitecoreType <Stub1>(); type1.Field(x => x.Field1); var type2 = new SitecoreType <Stub2>(); type2.Field(x => x.Field2); //Act type2.Import(type1); //Assert Assert.AreEqual(2, type2.Config.Properties.Count()); }