Exemplo n.º 1
0
 public TResult ExecuteWhenAs(IActor actor)
 {
     if (_executableAction.Actions.IsEmpty)
     {
         return(Action.ExecuteWhenAs(actor));
     }
     else
     {
         _executableAction.ExecuteWhenAs(actor);
         return(actor.Execute(Action));
     }
 }
Exemplo n.º 2
0
 public void ExecuteWhenAs_ShouldCallActorExecute(
     CompositeAction sut,
     Mock <IActor> actor
     )
 {
     //arrange
     //act
     sut.ExecuteWhenAs(actor.Object);
     //assert
     foreach (var action in sut.Actions)
     {
         actor.Verify(a => a.Execute(action), Times.Once());
     }
 }