Ejemplo n.º 1
0
        public void ComInterfaceAsReturnValue()
        {
            var creator = new TestLib.ClassCreator();
            var root    = creator.CreateRoot(1);

            Assert.IsNotNull(root);
            Assert.AreEqual(1, root.GetId());
        }
Ejemplo n.º 2
0
        public void ComInterfaceAsParameter()
        {
            var creator = new TestLib.ClassCreator();
            var root    = creator.CreateRoot(1);

            Assert.IsNotNull(root);
            Assert.AreEqual(1, root.GetId());

            var child = creator.CreateChild(2, (TestLib.IParent_Automation)root);

            Assert.AreEqual(2, child.GetId());
            Assert.AreEqual(1, child.GetParentId());
        }