コード例 #1
0
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
        public TResult ExecuteGivenAs(IActor actor)
        {
            if (_executableAction.Actions.IsEmpty)
            {
                return(Action.ExecuteGivenAs(actor));
            }
            else
            {
                _executableAction.ExecuteGivenAs(actor);
                return(actor.Execute(Action));
            }
        }
コード例 #2
0
 public void ExecuteGivenAs_ShouldCallActorExecute(
     CompositeAction sut,
     Mock <IActor> actor
     )
 {
     //arrange
     //act
     sut.ExecuteGivenAs(actor.Object);
     //assert
     foreach (var action in sut.Actions)
     {
         actor.Verify(a => a.Execute(action), Times.Once());
     }
 }