You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
877 B
33 lines
877 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Model;
|
|
|
|
namespace Testeur
|
|
{
|
|
public class UT_NumberDice
|
|
{
|
|
[Theory]
|
|
[InlineData(true, "De1", "De1" ,1,6,1,6)]
|
|
[InlineData(false, "", "", 1, 7, 1, 6)]
|
|
|
|
public void TestConstructor(bool isValid,string expectedName, string name ,int expectedMin,int expectedMax,int min,int max)
|
|
{
|
|
|
|
if (!isValid)
|
|
{
|
|
Assert.Throws<ArgumentException>(() => new NumberDie(name,min, max));
|
|
return;
|
|
}
|
|
NumberDie d = new NumberDie(name,min,max);
|
|
Assert.Equal(expectedMin, d.Min);
|
|
Assert.Equal (expectedMax, d.Max);
|
|
Assert.Equal( expectedName,d.Name);
|
|
}
|
|
|
|
|
|
}
|
|
}
|