public void TestCellPrinter1() { try { CellPrinter print = testex1.Method1() as CellPrinter; Assert.IsTrue(true); } catch (System.Exception) { Assert.IsTrue(false); } }
public void Ex1Methd1_position() { Exercise1 ex1 = new Exercise1(); CellPrinter cp = (CellPrinter)ex1.Method1(); Assert.Equal("Cell is on Position X:1 Y:1", cp.PrintPostion(1, 1)); }
public void Ex1Methd1_notalive() { Exercise1 ex1 = new Exercise1(); CellPrinter cp = (CellPrinter)ex1.Method1(); Assert.Equal($"Cell red born on {System.DateTime.Now} is not alive", cp.PrintState(false, System.DateTime.Now, "red")); }
public void Exercise1Method1Test3() { Exercise1 e1 = new Exercise1(); CellPrinter returnedObject = (CellPrinter)e1.Method1(); Assert.AreEqual(returnedObject.PrintState(true, new System.DateTime(2019, 12, 12), "red"), "Cell red born on 12.12.2019 is alive"); }
public void Exercise1Method1Test2() { Exercise1 e1 = new Exercise1(); CellPrinter returnedObject = (CellPrinter)e1.Method1(); Assert.AreEqual(returnedObject.PrintPostion(1, 2), "Cell is on Position X:1 Y:2"); }
public void Ex1Test1() { Exercise1 ex1 = new Exercise1(); CellPrinter cellPrinter = (CellPrinter)ex1.Method1(); Assert.AreEqual(cellPrinter.PrintState(true, System.DateTime.Now, "red"), $"Cell red born on {System.DateTime.Now} is alive"); }
public void Ex1Test2() { Exercise1 ex1 = new Exercise1(); CellPrinter cellPrinter = (CellPrinter)ex1.Method1(); Assert.AreEqual(cellPrinter.PrintPostion(1, 1), "Cell is on Position X:1 Y:1"); }
public void Test1() { var exercise1 = new Exercise1(); var method1 = exercise1.Method1(); Assert.NotNull(method1); }
public void Exercise1Method1Test1() { Exercise1 e1 = new Exercise1(); CellPrinter returnedObject = (CellPrinter)e1.Method1(); CellPrinter expectedObject = new CellPrinter(); Assert.AreEqual(returnedObject.GetType(), expectedObject.GetType()); }
public void TestIfInstanceIsCellPrinter() { if (ex1.Method1().GetType() == typeof(CellPrinter)) { Assert.IsTrue(true); } else { Assert.IsTrue(false); } }