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.
56 lines
1.2 KiB
56 lines
1.2 KiB
using QwirkleClassLibrary.Tiles;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace TestBase
|
|
{
|
|
public class TestTile
|
|
{
|
|
[Fact]
|
|
public void TestCreateCorrect()
|
|
{
|
|
Tile t = new Tile(Shape.Star, Color.Blue);
|
|
Assert.NotNull(t);
|
|
Assert.Equal(Shape.Star, t.GetShape);
|
|
Assert.Equal(Color.Blue, t.GetColor);
|
|
}
|
|
|
|
public static TheoryData<Shape, Color> Data_Tile()
|
|
{
|
|
var data = new TheoryData<Shape, Color>
|
|
{
|
|
{
|
|
Shape.Round,
|
|
Color.Green
|
|
|
|
},
|
|
{
|
|
Shape.Shuriken,
|
|
Color.Red
|
|
}
|
|
};
|
|
return data;
|
|
}
|
|
|
|
[Theory]
|
|
[MemberData(nameof(Data_Tile))]
|
|
public void Test_Name(Shape shape, Color color)
|
|
|
|
{
|
|
Tile t = new(shape, color);
|
|
|
|
Shape s = t.GetShape;
|
|
Color c = t.GetColor;
|
|
string str = (c.ToString() + s.ToString());
|
|
Assert.Equal(t.NameColorTile(), str);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|