public void ExecuteGivenAs_ShouldCallActorExecute( [Frozen] IAction <object> action, ActionExecuteGiven sut, Mock <IActor> actor, AbilityGiven ability, object expected) { //arrange actor.Setup(a => a.Execute(action)).Returns(expected); //act var actual = sut.ExecuteGivenAs(actor.Object, ability); //assert Assert.Equal(expected, actual); }
public void ExecuteGivenAs_ShouldUseCorrectAbility(ActionExecuteGiven sut, Mock <IActor> actor, AbilityGiven expected) { //arrange //act sut.ExecuteGivenAs(actor.Object, expected); //assert Assert.Equal(expected, sut.Ability); }
public void ExecuteGivenAs_ShouldUseCorrectActor(ActionExecuteGiven sut, Mock <IActor> actor, AbilityGiven ability) { //arrange var expected = actor.Object; //act sut.ExecuteGivenAs(actor.Object, ability); //assert Assert.Equal(expected, sut.Actor); }