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 Data_Tile() { var data = new TheoryData { { 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); } } }