public void TypeCbyCLRProxy() { JInterfacesHelper h = new JInterfacesHelper(); CWithJavaInterface cwc = h.getCWithJavaInterfaceC(new CWithJavaInterface(0)); Object val = Bridge.WrapCLR(cwc); JniGlobalHandle jniGlobalHandle = ((IClrProxy)val).JvmHandle; RegistryRecord record = Registry.GetRecord(JNIEnv.ThreadEnv, jniGlobalHandle, val.getClass()); Assert.IsNotNull(record); jniGlobalHandle.HoldThisHandle(); }
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); }