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()); }
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()); }