Exemplo n.º 1
0
        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"));
        }
Exemplo n.º 2
0
        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));
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
0
        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");
        }
Exemplo n.º 5
0
        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");
        }
Exemplo n.º 6
0
        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");
        }
Exemplo n.º 7
0
        public void Exercise1Method1Test1()
        {
            Exercise1   e1             = new Exercise1();
            CellPrinter returnedObject = (CellPrinter)e1.Method1();
            CellPrinter expectedObject = new CellPrinter();

            Assert.AreEqual(returnedObject.GetType(), expectedObject.GetType());
        }
Exemplo n.º 8
0
 public void TestCellPrinter1()
 {
     try
     {
         CellPrinter print = testex1.Method1() as CellPrinter;
         Assert.IsTrue(true);
     }
     catch (System.Exception)
     {
         Assert.IsTrue(false);
     }
 }
Exemplo n.º 9
0
 public void TestCellPrinter2()
 {
     CellPrinter print = testex1.Method1() as CellPrinter;
 }
Exemplo n.º 10
0
        public void Test2()
        {
            var x = new CellPrinter();

            Assert.AreEqual("Cell rot born on 12.12.2019 is alive", x.PrintState(true, date, "rot"));
        }
Exemplo n.º 11
0
        public void Test1()
        {
            var x = new CellPrinter();

            Assert.AreEqual("Cell is on Position X:1 Y:2", x.PrintPostion(1, 2));
        }
Exemplo n.º 12
0
        public void Test2()
        {
            CellPrinter cellPrinter = new CellPrinter();

            Assert.AreEqual("Cell is on Position X:6 Y:7", cellPrinter.PrintPostion(6, 7));
        }
Exemplo n.º 13
0
        public void Test1()
        {
            CellPrinter cellPrinter = new CellPrinter();

            Assert.AreEqual("Cell rot born on 14.12.2019 is alive", cellPrinter.PrintState(true, new System.DateTime(2019, 12, 14).Date, "rot"));
        }