public void advisedAction_ctor() { GenericParameterHelper target = new GenericParameterHelper(); AdvisedAction actual = new AdvisedAction( target, ProposedActions.Delete ); actual.Action.Should().Be.EqualTo( ProposedActions.Delete ); actual.Target.Should().Be.EqualTo( target ); }
public void advisedAction_ctor_invalid_proposed_action() { AdvisedAction actual = new AdvisedAction( new Object(), ( ProposedActions )1000 ); }
public void advisedAction_ctor_not_supported_proposed_action() { AdvisedAction actual = new AdvisedAction( new Object(), ProposedActions.None ); }
public void advisedAction_ctor_null_reference_target() { AdvisedAction actual = new AdvisedAction( null, ProposedActions.Delete ); }
/// <summary> /// Called in order to create the advised action for the give target. /// </summary> /// <param name="target">The target entity.</param> /// <param name="proposedAction">The proposed action.</param> /// <returns>The advised action.</returns> protected virtual IAdvisedAction OnCreateAdvisedAction( Object target, ProposedActions proposedAction ) { var advisedAction = new AdvisedAction( target, proposedAction ); return advisedAction; }