Example #1
0
        public void CallStaticMethodWithInterfaceParameter()
        {
            Point p = new Point(11, 11);

            PointUser.StaticDoSomethingInterface(p);

            // no asert, just watch IL code
        }
Example #2
0
        public void Expectation1()
        {
            Point p = new Point(1, 1);

            var result = p.ToString();

            Assert.AreEqual("(1, 1)", result);
        }
Example #3
0
        public void CallStaticMethodWithConcreteParameter()
        {
            Point p = new Point(10, 10);

            PointUser.StaticDoSomethingConcrete(p);

            // no asert, just watch IL code
        }
Example #4
0
        public void CallVirtualMethodWithInterfaceParameter()
        {
            Point p = new Point(9, 9);
            PointUser user = new PointUser();

            user.VirtualDoSomethingInterface(p);

            // no asert, just watch IL code
        }
Example #5
0
        public void CallVirtualMethodWithConcreteParameter()
        {
            Point p = new Point(8, 8);
            PointUser user = new PointUser();

            user.VirtualDoSomethingConcrete(p);

            // no asert, just watch IL code
        }
Example #6
0
        public void CallMethodWithInterfaceInstanceParameter()
        {
            Point p = new Point(7, 7);
            PointUser user = new PointUser();

            user.DoSomethingInterface(p);

            // no asert, just watch IL code
        }
Example #7
0
        public void CallMethodWithConcreteInstanceParameter()
        {
            Point p = new Point(6, 6);
            PointUser user = new PointUser();

            user.DoSomethingConcrete(p);

            // no asert, just watch IL code
        }
Example #8
0
        public void Expectation3()
        {
            object o = new Point(1, 1);
            ((Point) o).Change(3, 3);

            var result = o.ToString();

            Assert.AreEqual("(3, 3)", result);
        }
Example #9
0
        public void Expectation2()
        {
            object o = new Point(2, 2);

            var result = o.ToString();

            Assert.AreEqual("(2, 2)", result);
        }
Example #10
0
        public void T()
        {
            Point p = new Point(11, 11);
            p.Change(20,20);

            IPoint p2 = new Point(12, 12);
            p2.Change(21, 21);

            // no asert, just watch IL code
        }
Example #11
0
        public void Expectation4()
        {
            Point p = new Point(1, 1);
            ((IPoint) p).Change(4, 4);

            var result = p.ToString();

            Assert.AreEqual("(4, 4)", result);
        }