public void printBingoToConsole(BingoPlate plate) { const string vertDivider = "|"; const string Divider1 = "*---------------------------"; const string Divider2 = "-------------------------------*"; string print = ""; Console.WriteLine($"unique ID string: {plate.UniqueId}"); Console.WriteLine(Divider1 + plate.Name + Divider2); for (int y = 0; y < 3 /*plate.Columns.Length*/; y++) { for (int x = 0; x < 9 /*plate.Columns.Length*/; x++) { string number = plate.Columns[x][y].ToString(); if (number.Length < 2) { number = "0" + number; } print = print + vertDivider + number + vertDivider; } Console.WriteLine(print); print = ""; } Console.WriteLine(Divider1 + plate.Id + Divider2); Console.WriteLine(); }
public void VerifyPlateTestIdenticalPlatesNotAdded() {//arrange BingoPlate testPlate2 = new BingoPlate(2, "Test Plate 2"); factory.Batch.Add(TestPlate); int previousBatchcount = factory.Batch.Count; testPlate2.UniqueId = TestPlate.UniqueId; //act factory.VerifyPlate(testPlate2); if (factory.VerifyPlate(testPlate2) == 5) { factory.Batch.Add(testPlate2); } //assert Assert.IsTrue(factory.Batch.Count == previousBatchcount); }