refactor: renamed Model.cs to Score.cs

This commit is contained in:
Gerard Gascón 2024-04-17 00:05:36 +02:00
parent 2be3b572fb
commit 5d470a57af
8 changed files with 48 additions and 48 deletions

View file

@ -0,0 +1,39 @@
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(1f, 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);
}
}
}