public void Association_when_reference_should_throw_when_complex_property_expression() { var configuration = new UpdateModificationFunctionConfiguration <Entity>(); Assert.Equal( Strings.InvalidPropertyExpression("e => e.Parent.Parent"), Assert.Throws <InvalidOperationException>( () => configuration.Association <Entity>(e => e.Parent.Parent, c => { })).Message); }
public void Association_when_reference_should_invoke_action_with_configuration() { var configuration = new UpdateModificationFunctionConfiguration <Entity>(); AssociationModificationFunctionConfiguration <Entity> associationConfiguration = null; configuration.Association <Entity>(e => e.Parent, c => { associationConfiguration = c; }); Assert.NotNull(associationConfiguration); }
public void Association_when_reference_should_throw_when_complex_property_expression() { var configuration = new UpdateModificationFunctionConfiguration<Entity>(); Assert.Equal( Strings.InvalidPropertyExpression("e => e.Parent.Parent"), Assert.Throws<InvalidOperationException>( () => configuration.Association<Entity>(e => e.Parent.Parent, c => { })).Message); }
public void Association_when_reference_should_invoke_action_with_configuration() { var configuration = new UpdateModificationFunctionConfiguration<Entity>(); AssociationModificationFunctionConfiguration<Entity> associationConfiguration = null; configuration.Association<Entity>(e => e.Parent, c => { associationConfiguration = c; }); Assert.NotNull(associationConfiguration); }