Package org.jacorb.test

Examples of org.jacorb.test.NonEmptyException


    public int ex_2( IntHolder p, boolean do_it, int delay )
        throws NonEmptyException
    {
        delay( delay );
        if ( do_it )
            throw new NonEmptyException( "just do it", p.value, "xxx" );
        else
            return p.value;
    }
View Full Code Here


    public void ex_3( boolean non_empty, int delay )
        throws NonEmptyException, EmptyException
    {
        delay( delay );
        if ( non_empty )
            throw new NonEmptyException( 4321, "zzz" );
        else
            throw new EmptyException( "reason" );
    }
View Full Code Here

    * Tests creating a DynAny object from an Any object using the
    * DynAnyFactory object.
    */
   public void testFactoryCreateFromAny ()
   {
      NonEmptyException type = null;
      org.omg.CORBA.Any any = null;

      type = new NonEmptyException (1, "Hello");
      any = orb.create_any ();
      NonEmptyExceptionHelper.insert (any, type);

      createDynAnyFromAny (any);
   }
View Full Code Here

    * Test comparing DynAny values.
    */
   public void testCompareDynAny ()
   {
      String msg;
      NonEmptyException type;
      org.omg.CORBA.Any any = null;
      org.omg.DynamicAny.DynStruct dynAny = null;
      org.omg.DynamicAny.DynStruct dynAny2 = null;

      type = new NonEmptyException (1, "Hello");
      any = orb.create_any ();
      NonEmptyExceptionHelper.insert (any, type);
      dynAny = createDynAnyFromAny (any);
      dynAny2 = createDynAnyFromAny (any);

View Full Code Here

   {
      final String name1 = "field1"; // specific to IDL
      final String name2 = "field2"; // specific to IDL
      String msg;
      org.omg.CORBA.Any any = null;
      NonEmptyException type = null;
      int oldInt = 1;
      String oldStr = "Hello";
      int newInt = 2;
      String newStr = "GoodBye";
      org.omg.DynamicAny.DynStruct dynAny = null;
      org.omg.DynamicAny.NameValuePair [] pairs = null;

      type = new NonEmptyException (oldInt, oldStr);
      any = orb.create_any ();
      NonEmptyExceptionHelper.insert (any, type);
      dynAny = createDynAnyFromAny (any);

      // test extracting the name/value pairs as Anys
View Full Code Here

   {
      final String name1 = "field1"; // specific to IDL
      final String name2 = "field2"; // specific to IDL
      String msg;
      org.omg.CORBA.Any any = null;
      NonEmptyException type = null;
      int oldInt = 1;
      String oldStr = "Hello";
      int newInt = 2;
      String newStr = "GoodBye";
      org.omg.DynamicAny.DynStruct dynAny = null;
      org.omg.DynamicAny.DynAny dynAny1 = null;
      org.omg.DynamicAny.DynAny dynAny2 = null;
      org.omg.DynamicAny.NameDynAnyPair [] pairs = null;

      type = new NonEmptyException (oldInt, oldStr);
      any = orb.create_any ();
      NonEmptyExceptionHelper.insert (any, type);
      dynAny = createDynAnyFromAny (any);

      // test extracting the name/value pairs as DynAnys
View Full Code Here

    * Test initializing a DynAny object from another DynAny object.
    */
   public void testInitDynAnyFromDynAny ()
   {
      String msg;
      NonEmptyException type;
      org.omg.CORBA.Any any = null;
      org.omg.CORBA.TypeCode tc = null;
      org.omg.DynamicAny.DynStruct dynAny = null;
      org.omg.DynamicAny.DynStruct dynAny2 = null;

      tc = NonEmptyExceptionHelper.type ();
      dynAny = createDynAnyFromTypeCode (tc);

      type = new NonEmptyException (1, "Hello");
      any = orb.create_any ();
      NonEmptyExceptionHelper.insert (any, type);
      dynAny2 = createDynAnyFromAny (any);

      msg = "Failed to initialize a DynAny object from another DynAny ";
View Full Code Here

    * Test initializing a DynAny object from an Any value.
    */
   public void testInitDynAnyFromAny ()
   {
      String msg;
      NonEmptyException type;
      org.omg.CORBA.Any any = null;
      org.omg.CORBA.TypeCode tc = null;
      org.omg.DynamicAny.DynStruct dynAny = null;
      org.omg.DynamicAny.DynStruct dynAny2 = null;

      tc = NonEmptyExceptionHelper.type ();
      dynAny = createDynAnyFromTypeCode (tc);

      type = new NonEmptyException (1, "Hello");
      any = orb.create_any ();
      NonEmptyExceptionHelper.insert (any, type);
      dynAny2 = createDynAnyFromAny (any);

      msg = "Failed to initialize a DynAny object from an Any object ";
View Full Code Here

    * Test destroying a DynAny object.
    */
   public void testDestroyDynAny ()
   {
      String msg;
      NonEmptyException type;
      org.omg.CORBA.Any any = null;
      org.omg.DynamicAny.DynStruct dynAny = null;

      type = new NonEmptyException (1, "Hello");
      any = orb.create_any ();
      NonEmptyExceptionHelper.insert (any, type);
      dynAny = createDynAnyFromAny (any);
      dynAny.destroy ();

View Full Code Here

    * Test destroying a component of a DynAny object.
    */
   public void testDestroyComponent ()
   {
      String msg;
      NonEmptyException type;
      org.omg.CORBA.Any any = null;
      org.omg.DynamicAny.DynStruct dynAny = null;
      org.omg.DynamicAny.DynAny comp = null;

      type = new NonEmptyException (1, "Hello");
      any = orb.create_any ();
      NonEmptyExceptionHelper.insert (any, type);
      dynAny = createDynAnyFromAny (any);

      try
View Full Code Here

TOP

Related Classes of org.jacorb.test.NonEmptyException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.