public void When_Base_Key_Compare_Are_Set_Then_Keys_And_Compares_Data_Are_Set() { var inhertitanceChain = new InhertitanceChain(); var keyCompareData = new KeyCompareData(new CustomType(), new[] { "Prop11", "Prop22", "Prop33" }, new[] { "Prop12", "Prop21", "Prop33" }); var keys = inhertitanceChain.GetKeys(keyCompareData.Keys); var compares = inhertitanceChain.GetCompares(keyCompareData.Compares); keys.Should().NotBeNull(); keys.Count.Should().Be(keyCompareData.Keys.Length); keys.Keys.All(x => keyCompareData.Keys.Any(y => y == x)).Should().BeTrue(); compares.Should().NotBeNull(); compares.Count.Should().Be(keyCompareData.Compares.Length); compares.Keys.All(x => keyCompareData.Compares.Any(y => y == x)).Should().BeTrue(); }
public void When_Key_Compare_Are_Set_Then_Keys_And_Compares_Data_Are_Set() { var customType = new CustomType(); var keyCompareData = new KeyCompareData(new CustomType(), new[] { "T1", "T2", "T3" }, new[] { "T5", "T7", "T8" }); var keys = customType.GetKeys(keyCompareData.Keys); var compares = customType.GetCompares(keyCompareData.Compares); keys.Should().NotBeNull(); keys.Count.Should().Be(keyCompareData.Keys.Length); keys.Keys.All(x => keyCompareData.Keys.Any(y => y == x)).Should().BeTrue(); compares.Should().NotBeNull(); compares.Count.Should().Be(keyCompareData.Compares.Length); compares.Keys.All(x => keyCompareData.Compares.Any(y => y == x)).Should().BeTrue(); }