Skip to content
Permalink
Browse files
Add testcase for fix in fvd generation.
  • Loading branch information
ngmr committed Jul 14, 2015
1 parent 92b86cd commit cd1f145f93d3121a3f38ba42610157f635a1786f
Showing 2 changed files with 49 additions and 0 deletions.
@@ -0,0 +1,18 @@
package org.apache.yoko;

import org.junit.Before;
import org.junit.Test;

public class MetaTest extends AbstractOrbTestBase {

@Before
public void setUp() throws Exception {
super.setUp();
setWaitForFile("Test.ref");
}

@Test
public void testMeta() throws Exception {
client.invokeMain("test.meta.TestMeta");
}
}
@@ -0,0 +1,31 @@
package test.meta;

import java.io.Serializable;

import javax.rmi.CORBA.Util;
import javax.rmi.CORBA.ValueHandler;

import org.junit.Assert;
import org.omg.CORBA.ValueDefPackage.FullValueDescription;
import org.omg.SendingContext.CodeBase;

public class TestMeta {

public static void main(String[] args) throws Exception {
testMeta();
}

public static void testMeta() 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 static class Data implements Serializable {
private static final long serialVersionUID = 1L;
public Data d;
}

}

0 comments on commit cd1f145

Please sign in to comment.