Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
4 changed files
with
42 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,49 @@ | ||
package org.apache.yoko; | ||
|
||
import java.io.Serializable; | ||
|
||
import javax.rmi.CORBA.Util; | ||
import javax.rmi.CORBA.ValueHandler; | ||
|
||
import junit.framework.TestCase; | ||
|
||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.omg.CORBA.ValueDefPackage.FullValueDescription; | ||
import org.omg.SendingContext.CodeBase; | ||
|
||
import test.fvd.Marshalling; | ||
|
||
public class MetaTest extends TestCase { | ||
|
||
public class MetaTest extends AbstractOrbTestBase { | ||
public static void testMetaForClassWithASelfReference() throws Exception { | ||
ValueHandler vh = Util.createValueHandler(); | ||
CodeBase codebase = (CodeBase)vh.getRunTimeCodeBase(); | ||
String dataClassRepid = vh.getRMIRepositoryID(Data.class); | ||
FullValueDescription fvd = codebase.meta(dataClassRepid); | ||
Assert.assertNotNull(fvd); | ||
} | ||
|
||
public void testMetaForClassWithTwoSelfReferences() { | ||
Marshalling.DEFAULT_VERSION.select(); | ||
ValueHandler vh = Util.createValueHandler(); | ||
CodeBase codebase = (CodeBase)vh.getRunTimeCodeBase(); | ||
String dataClassRepid = vh.getRMIRepositoryID(X.class); | ||
System.out.println(dataClassRepid); | ||
FullValueDescription fvd = codebase.meta(dataClassRepid); | ||
Assert.assertNotNull(fvd); | ||
} | ||
|
||
@Before | ||
public void setUp() throws Exception { | ||
super.setUp(); | ||
setWaitForFile("Test.ref"); | ||
public static class Data implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
public Data d; | ||
} | ||
|
||
@Test | ||
public void testMeta() throws Exception { | ||
client.invokeMain("test.meta.TestMeta"); | ||
public static class X { | ||
X x1; | ||
X x2; | ||
} | ||
} | ||
|
||
|
This file was deleted.
Oops, something went wrong.