|
|
|
@ -0,0 +1,31 @@
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Model;
|
|
|
|
|
|
|
|
|
|
namespace Testeur
|
|
|
|
|
{
|
|
|
|
|
class TestMethodeRandom
|
|
|
|
|
{
|
|
|
|
|
[Fact]
|
|
|
|
|
public void TesterMethodeRandom()
|
|
|
|
|
{
|
|
|
|
|
//Arrange
|
|
|
|
|
NumberDie nd = new NumberDie("de1",2,13);
|
|
|
|
|
//Act
|
|
|
|
|
int actual = nd.getRandom();
|
|
|
|
|
int expectedMin = nd.Min;
|
|
|
|
|
int expectedMax = nd.Max;
|
|
|
|
|
|
|
|
|
|
//Assert
|
|
|
|
|
|
|
|
|
|
Assert.InRange(actual, expectedMin, expectedMax);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|