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

        Assert.That(ExpressionsEx.WasPropertyChanged <NumbNut>(args, nn => nn.SerendipityCollection), Is.True);
    }
Exemple #2
0
 public void WasPropertyChanged_IfPassedNameIsSameAsNameOfPassedExpressionMember_True()
 {
     Assert.That(ExpressionsEx.WasPropertyChanged <NumbNut>("SerendipityCollection", nn => nn.SerendipityCollection), Is.True);
 }
Exemple #3
0
 public void IfExpressionIsNull_Error()
 {
     CommonAssertions.NotNullRequired(() => ExpressionsEx.GetPropertyName <NumbNut>(null));
 }
Exemple #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");
 }
Exemple #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"));
 }
Exemple #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"));
 }