示例#1
0
        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);
        }
示例#2
0
 public void ExecuteGivenAs_ShouldUseCorrectAbility(ActionExecuteGiven sut, Mock <IActor> actor, AbilityGiven expected)
 {
     //arrange
     //act
     sut.ExecuteGivenAs(actor.Object, expected);
     //assert
     Assert.Equal(expected, sut.Ability);
 }
示例#3
0
        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);
        }