236237238239240241242243244245246
CorbaObjectWriter writer = new CorbaObjectWriter(oStream); String wstringValue = new String("String"); writer.writeWString(wstringValue); InputStream iStream = oStream.create_input_stream(); String s = iStream.read_wstring(); assertTrue(s.equals(wstringValue)); } @Test public void testWriteArray() {
135136137138139140141142143
OutputStream oStream = orb.create_output_stream(); streamable._write(oStream); InputStream iStream = oStream.create_input_stream(); String value = iStream.read_wstring(); assertEquals("TestWString", value); } }
110111112113114115116117118119120
{ String pre = "abc"; os.write_wstring(pre); InputStream is = os.create_input_stream(); assertTrue(is.available() > 0); String post = is.read_wstring(); assertEquals(pre, post); } public void testBoolean() throws IOException {
203204205206207208209210211
assertEquals(is.read_string(), "hi"); assertEquals(is.read_ulong(), 765); assertEquals(is.read_ulonglong(), 567); assertEquals(is.read_ushort(), (short)23); assertEquals(is.read_wchar(), 'b'); assertEquals(is.read_wstring(), "bye"); } }
7879808182838485868788
{ String pre = "abc"; os.write_wstring(pre); InputStream is = os.create_input_stream(); assertTrue(is.available() > 0); String post = is.read_wstring(); assertEquals(pre, post); } @Test public void testBoolean() throws IOException
176177178179180181182183184