public void IsEqualOnPropertyLevel_NotEqual_WithResult() { // arrange var source = new Testklasse() { Text = "Hallo", Nummer = 1, Egal = "Eins" }; var target = new Testklasse() { Text = "Hallo", Nummer = 2, Egal = "Zwei" }; MemberComparisonResult[] results = null; // act var result = source.IsEqualOnPropertyLevel(target, ref results, typeof(IgnoreInPropertyComparisonAttribute)); // assert result.Should().BeFalse(); results.Should().NotBeNull(); results.Should().HaveCount(1); results[0].MemberName.Should().Be("Nummer"); results[0].SourceValue.Should().Be(1); results[0].TargetValue.Should().Be(2); }
public void IsEqualOnPropertyLevel_NotEqual_ReturnsFalse() { // arrange var source = new Testklasse() { Text = "Hallo", Nummer = 1, Egal = "Eins" }; var target = new Testklasse() { Text = "Hallo", Nummer = 2, Egal = "Zwei" }; // act var result = source.IsEqualOnPropertyLevel(target, typeof(IgnoreInPropertyComparisonAttribute)); // assert result.Should().BeFalse(); }