public void WasPropertyChanged_IfPassedPropertyChangeArgNameIsSameAsNameOfPassedExpressionMember_True() { var args = new PropertyChangedEventArgs("SerendipityCollection"); Assert.That(ExpressionsEx.WasPropertyChanged <NumbNut>(args, nn => nn.SerendipityCollection), Is.True); }
public void WasPropertyChanged_IfPassedNameIsSameAsNameOfPassedExpressionMember_True() { Assert.That(ExpressionsEx.WasPropertyChanged <NumbNut>("SerendipityCollection", nn => nn.SerendipityCollection), Is.True); }
public void IfExpressionIsNull_Error() { CommonAssertions.NotNullRequired(() => ExpressionsEx.GetPropertyName <NumbNut>(null)); }
public void NodeTypeIs_Constant_Error() { CommonAssertions.PreconditionCheck(() => ExpressionsEx.GetPropertyName <NumbNut>(nn => NumbNut.Name), "does not refer to a property and is therefore not supported"); }
public void NodeTypeIs_MemberAccess_aka_MemberExpression_Ok() { Assert.That(ExpressionsEx.GetPropertyName <NumbNut>(nn => nn.SerendipityCollection), Is.EqualTo("SerendipityCollection")); Assert.That(ExpressionsEx.GetPropertyName <NumbNut>(nn => nn.Lame), Is.EqualTo("Lame")); }
public void NodeTypeIs_Convert_aka_UnaryExpression_Ok() { Assert.That(ExpressionsEx.GetPropertyName <NumbNut>(nn => NumbNut.Age), Is.EqualTo("Age")); Assert.That(ExpressionsEx.GetPropertyName <NumbNut>(nn => NumbNut.IsMammel), Is.EqualTo("IsMammel")); Assert.That(ExpressionsEx.GetPropertyName <NumbNut>(nn => NumbNut.Surname), Is.EqualTo("Surname")); }