This is my problem test:
[Test]
public void PlayerHasPointsIncreasedOnEnterByFifteen() {
// Arrange.
var playerOneFake = new Mock<IEntity>();
playerOneFake.SetupGet(p => p.Score).Returns(0);
var pointState = new PointState(playerOneFake.Object);
// Act.
pointState.Enter();
// Assert
IEntity entity = playerOneFake.Object;
Assert.AreEqual(15, entity.Score, "Player score is incorrect");
}
p.Score needs only to return zero once - the first time I check it in PointState. After this I need a non-mocked version to check the actually score has been incremented in the assert.
I know you can verify by a set amount of times - e.g. Times.Once() but how do I have this functionality in a set up?
Any ideas? It's driving me mad.
Cheers.