Example #1
0
    public virtual void Init(RichTextBox outputText)
    {
        m_output_text = outputText;

        // clear log
        File.WriteAllText(m_log_path, String.Empty);

        Test1 testCase1 = new Test1();

        m_tests.Add(testCase1);

        Test2 testCase2 = new Test2();

        m_tests.Add(testCase2);

        Test3 testCase3 = new Test3();

        m_tests.Add(testCase3);

        Test4 testCase4 = new Test4();

        m_tests.Add(testCase4);

        Test5 testCase5 = new Test5();

        m_tests.Add(testCase5);

        Test6 testCase6 = new Test6();

        m_tests.Add(testCase6);
    }
        public void GivenTest6_generatesExpectedResult()
        {
            var tst6 = new Test6();
            var ctxt = (CTextBlock)tst6.Content;

            var info = new MetryHolder(ctxt, 1000, 1000);

            Approvals.Verify(
                new ApprovalImageWriter(info.Image),
                Approvals.GetDefaultNamer(),
                new DiffToolReporter(DiffEngine.DiffTool.WinMerge));
        }
Example #3
0
    public void Deep_Clone_Typed_Enumerable_Property()
    {
        var test1 = new Test6 {
            MyTest1 = new[] { new Test1(), new Test1() }
        };

        var clone = (Test6)test1.DeepClone();

        Assert.AreNotSame(test1, clone);
        Assert.AreEqual(test1.MyTest1.Count(), clone.MyTest1.Count());
        for (var i = 0; i < test1.MyTest1.Count(); i++)
        {
            Assert.IsNotNull(clone.MyTest1.ElementAt(i));
            Assert.AreNotSame(clone.MyTest1.ElementAt(i), test1.MyTest1.ElementAt(i));
        }
    }
Example #4
0
        static void Main()
        {
            Test0.Test();
            Console.WriteLine();
            Test1.Test();
            Console.WriteLine();
            Test2.Test();
            Console.WriteLine();
            Test3.Test();
            Console.WriteLine();
            Test4.Test();
            Console.WriteLine();
            Test5.Test();
            Console.WriteLine();
            Test6.Test();
            Console.WriteLine();

            Console.ReadKey();
        }
Example #5
0
 public static int Main()
 {
     Test1.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test1 OK");
     }
     Test2.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test2 OK");
     }
     Test3.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test3 OK");
     }
     Test4.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test4 OK");
     }
     Test5.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test5 OK");
     }
     Test6.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test6 OK");
     }
     Test7.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test7 OK");
     }
     Test8.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test8 OK");
     }
     Test9.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test9 OK");
     }
     Test10.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test10 OK");
     }
     Test11.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test11 OK");
     }
     Test12.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test12 OK");
     }
     Test13.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test13 OK");
     }
     Test14.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test14 OK");
     }
     Test15.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test15 OK");
     }
     Test16.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test16 OK");
     }
     Test17.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test17 OK");
     }
     Test18.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test18 OK");
     }
     Test19.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test19 OK");
     }
     Test20.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test20 OK");
     }
     Test21.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test21 OK");
     }
     Test22.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test22 OK");
     }
     Test23.Test();
     if (Utils.failures == 0)
     {
         Console.WriteLine("Test23 OK");
     }
     if (Utils.failures > 0)
     {
         return(101);
     }
     else
     {
         Console.WriteLine("PASS");
         return(100);
     }
 }
 public Test5(Test6 Other)
 {
     Assert.IsNotNull(Other);
 }
 public Test5(Test6 Other)
 {
     Assert.IsNotNull(Other);
 }