I'm playing around with TDD and unit testing in general. All the examples I've seen return values and that seems like the easiest case. However what if my function doesn't return a value?
For example let's say I have an Actor class and I need a way to increase it's "health". I made a unit test like below and then make the Actor class to satisfy it, but is this ok and common to do? I don't see many examples using properties in the unit test. Should I be thinking differently with this kind of stuff?
[TestMethod]
public void IncreaseHealth_PositiveValue_PositiveHealth()
{
Actor a = new Actor();
int beforeHealth = a.Health;
a.IncreaseHealth(5);
int afterHealth = a.Health;
Assert.AreEqual(beforeHealth + 5, afterHealth);
}