Merge pull request 'Ajout de plusieurs tests BestScore dont un provisoirement faux🚦' (#45) from testBestScore into dev

Reviewed-on: #45
Reviewed-by: Rémi LAVERGNE <remi.lavergne@etu.uca.fr>
pull/53/head
Rémi LAVERGNE 1 year ago
commit abd85d10ec

@ -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