public void cIfaceUnreg2() { IComparable comparable = testInstance.createJWithClrInterfaceUnreg(1); Runnable cw1 = Bridge.Cast <Runnable>(comparable); cw1.run(); cw1.run(); cw1.run(); var cw2 = testInstance.createJWithClrInterfaceUnreg(4); Assert.AreEqual(0, cw2.CompareTo(cw1)); cw1.run(); Assert.AreEqual((String)"5", cw1.ToString()); }
public void cIfaceUnreg3() { Runnable runnable = testInstance.createJWithClrInterfaceUnregRun(1); runnable.run(); runnable.run(); runnable.run(); var cw2 = testInstance.createJWithClrInterfaceUnreg(4); IComparable comparable = Bridge.Cast <IComparable>(runnable); Assert.AreEqual(0, comparable.CompareTo(cw2)); runnable.run(); Assert.AreEqual((String)"5", runnable.ToString()); }