Ajout de plusieurs tests BestScore dont un provisoirement faux🚦

pull/45/head
Remi NEVEU 1 year ago
parent 95e45780fb
commit c45dcdda68

@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Models;
namespace Tests
{
public class testBestScore
{
[Fact]
public void TestCstor()
{
BestScore b = new BestScore(12, 456);
Assert.NotNull(b);
Assert.Equal(12, b.GamesPlayed);
Assert.Equal(456, b.Score);
}
[Fact]
public void TestCstorNotEqual()
{
BestScore b = new BestScore(15, 4656);
Assert.NotNull(b);
Assert.NotEqual(12, b.GamesPlayed);
Assert.NotEqual(456, b.Score);
}
[Fact]
public void TestIncr()
{
BestScore b = new BestScore(12, 456);
b.IncrGamesPlayed();
Assert.NotNull(b);
Assert.Equal(13, b.GamesPlayed);
}
[Fact]
public void TestNotNegative()
{
BestScore b = new BestScore(-4, -98);
Assert.NotNull(b);
Assert.Equal(0, b.GamesPlayed);
Assert.Equal(0, b.Score);
}
}
}
Loading…
Cancel
Save