예제 #1
0
    public void WasPropertyChanged_IfPassedPropertyChangeArgNameIsSameAsNameOfPassedExpressionMember_True()
    {
        var args = new PropertyChangedEventArgs("SerendipityCollection");

        Assert.That(ExpressionsEx.WasPropertyChanged <NumbNut>(args, nn => nn.SerendipityCollection), Is.True);
    }
예제 #2
0
 public void WasPropertyChanged_IfPassedNameIsSameAsNameOfPassedExpressionMember_True()
 {
     Assert.That(ExpressionsEx.WasPropertyChanged <NumbNut>("SerendipityCollection", nn => nn.SerendipityCollection), Is.True);
 }
예제 #3
0
 public void IfExpressionIsNull_Error()
 {
     CommonAssertions.NotNullRequired(() => ExpressionsEx.GetPropertyName <NumbNut>(null));
 }
예제 #4
0
 public void NodeTypeIs_Constant_Error()
 {
     CommonAssertions.PreconditionCheck(() => ExpressionsEx.GetPropertyName <NumbNut>(nn => NumbNut.Name),
                                        "does not refer to a property and is therefore not supported");
 }
예제 #5
0
 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"));
 }
예제 #6
0
 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"));
 }