using Domain; using NUnit.Framework; namespace Tests { public class ScoreTests { [Test] public void OneIteration_UpdatesGrowPercentage() { Score sut = new(5, 5); for (int i = 0; i < 5; i++) { sut.Add(); } Assert.AreEqual(1f / 5f, sut.GrowPercentage); } [Test] public void AllIterations_GrowCompleted() { Score sut = new(5, 5); for (int i = 0; i < 5 * 5; i++) { sut.Add(); } Assert.AreEqual(0f, sut.GrowPercentage); } [Test] public void MoreIterations_ResetsGrowPercentage() { Score sut = new(5, 5); for (int i = 0; i < 6 * 5; i++) { sut.Add(); } Assert.AreEqual(1f / 5f, sut.GrowPercentage); } } }