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.
Browse files
Merge branch 'support_skipped_fields' into 'ibm-trunk'
Support skipped fields See merge request !57
- Loading branch information
Showing
23 changed files
with
1,173 additions
and
94 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
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
@@ -0,0 +1,36 @@ | ||
/** | ||
* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/** | ||
* @version $Rev: 491396 $ $Date: 2006-12-30 22:06:13 -0800 (Sat, 30 Dec 2006) $ | ||
*/ | ||
package org.apache.yoko; | ||
|
||
import static test.fvd.Marshalling.VERSION1; | ||
import static test.fvd.Marshalling.VERSION2; | ||
import test.fvd.MissingFieldsClient; | ||
import test.fvd.MissingFieldsServer; | ||
|
||
public class FVDTest extends AbstractOrbTestBase { | ||
public void testMissingFields() throws Exception { | ||
if (true) return; | ||
final String refFile = "missingfields.ref"; | ||
setWaitForFile(refFile); | ||
runServerClientTest(MissingFieldsServer.class, MissingFieldsClient.class, refFile, VERSION1.name(), VERSION2.name()); | ||
} | ||
} |
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
@@ -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 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
@@ -0,0 +1,7 @@ | ||
package test.fvd; | ||
|
||
import java.io.Serializable; | ||
|
||
public interface Abstract extends Serializable { | ||
|
||
} |
Oops, something went wrong.