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.
28 lines
560 B
28 lines
560 B
using Model.Dice;
|
|
using Model.Dice.Faces;
|
|
using Xunit;
|
|
|
|
namespace Tests.Model_UTs.Dice
|
|
{
|
|
public class NumberDieTest
|
|
{
|
|
|
|
[Fact]
|
|
public void TestGetRandomFace()
|
|
{
|
|
// Arrange
|
|
int val1 = 1, val2 = 2;
|
|
NumberDie die = new(new NumberFace(val1), new NumberFace(val2));
|
|
|
|
// Act
|
|
|
|
Face<int> thing = die.GetRandomFace();
|
|
|
|
// Assert
|
|
|
|
Assert.IsType<NumberFace>(thing);
|
|
Assert.True(thing.Value == val1 || thing.Value == val2);
|
|
}
|
|
}
|
|
}
|