public void DelegateCommandBuilder_using_simple_method_on_nested_property_should_generate_CommandData() { var sut = new DelegateCommandBuilder(); CommandData cd; var succeeded = sut.TryGenerateCommandData( new PropertyPath( "MyProperty.DoSomethingElse" ), new TestDataContext(), out cd ); Assert.IsTrue( succeeded ); Assert.IsTrue( cd.FastDelegate != null ); }
public void DelegateCommandBuilder_using_invalid_nested_path_should_not_fail() { var sut = new DelegateCommandBuilder(); CommandData cd; var succeeded = sut.TryGenerateCommandData( new PropertyPath( "MyProperty.ThisIsInvalid" ), new TestDataContext(), out cd ); Assert.IsFalse( succeeded ); Assert.IsNull( cd ); }
public void DelegateCommandBuilder_using_nested_PropertyPath_that_ends_with_Command_should_succeed() { var sut = new DelegateCommandBuilder(); CommandData cd; var succeeded = sut.TryGenerateCommandData( new PropertyPath( "MyProperty.OtherThatEndsWithCommand" ), new TestDataContext(), out cd ); Assert.IsTrue( succeeded ); Assert.IsTrue( cd.FastDelegate != null ); }