public void MeterTill_GetTillValueWhenOneQuarter_ReturnsOne() { IMeterTill subject = new MeterTill(20); subject.AddQuarter(); int value = subject.GetTillValue(); Assert.That(value, Is.EqualTo(1)); }
public void MeterTill_NewTillIsNotFull_ReturnsFalse(int addCount, bool isFull) { IMeterTill subject = new MeterTill(20); for (int x = 0; x < addCount; x++) { subject.AddQuarter(); } bool isEmpty = subject.IsTillFull(); Assert.That(isEmpty, Is.EqualTo(isFull)); }
public void MeterTill_GetTillValue_MatchesTestCase(int addCount, int tillValue) { IMeterTill subject = new MeterTill(20); for (int x = 0; x < addCount; x++) { subject.AddQuarter(); } int value = subject.GetTillValue(); Assert.That(value, Is.EqualTo(tillValue)); }
public void MeterTill_EmptyTill_TillValueIsZero(int addCount) { IMeterTill subject = new MeterTill(20); for (int x = 0; x < addCount; x++) { subject.AddQuarter(); } subject.EmptyTill(); int tillValue = subject.GetTillValue(); Assert.That(tillValue, Is.Zero); }