refactor: renamed Model.cs to Score.cs
This commit is contained in:
parent
2be3b572fb
commit
5d470a57af
8 changed files with 48 additions and 48 deletions
39
Assets/Scripts/Tests/ScoreTests.cs
Normal file
39
Assets/Scripts/Tests/ScoreTests.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue