Inheritance: Comparable, Runnable
Ejemplo n.º 1
0
        public void jIface()
        {
            var cw1 = new CWithJavaInterface(1);
            var cw2 = new CWithJavaInterface(2);
            Object other = (Object)Bridge.WrapCLR(cw2);
            Assert.AreEqual(1, cw1.compareTo(other));

            cw2.run();
            Assert.AreEqual(3, cw2.Value);
        }
Ejemplo n.º 2
0
 public void Interfaces1()
 {
     CWithJavaInterface a = new CWithJavaInterface(4);
     Runnable cw = testInstance.getCWithJavaInterface(a);
     CWithJavaInterface cwi = testInstance.getCWithJavaInterfaceC(a);
     cwi.run();
     cw.run();
     CWithJavaInterface tt = cw as CWithJavaInterface;
     Assert.AreEqual(6, tt.Value);
 }