예제 #1
0
        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 );
        }
예제 #2
0
 public void advisedAction_ctor_invalid_proposed_action()
 {
     AdvisedAction actual = new AdvisedAction( new Object(), ( ProposedActions )1000 );
 }
예제 #3
0
 public void advisedAction_ctor_not_supported_proposed_action()
 {
     AdvisedAction actual = new AdvisedAction( new Object(), ProposedActions.None );
 }
예제 #4
0
 public void advisedAction_ctor_null_reference_target()
 {
     AdvisedAction actual = new AdvisedAction( null, ProposedActions.Delete );
 }
예제 #5
0
 /// <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;
 }