Package com.github.ghetolay.jwamp.message

Examples of com.github.ghetolay.jwamp.message.WampArguments.nextObject()


 
  @Test(dependsOnMethods = {"connect"})
  public void callArrayArg() throws IOException, UnsupportedWampActionException, TimeoutException, CallException{
    WampArguments msg = wamp.simpleCall("arrayArgs");
   
    assertEquals( 10 , msg.nextObject(int.class).intValue() );
    assertEquals( 11 , msg.nextObject(int.class).intValue() );
    assertEquals( 12 , msg.nextObject(int.class).intValue() );
    assertEquals( 13 , msg.nextObject(int.class).intValue() );
    assertTrue(!msg.hasNext());
  }
View Full Code Here


  @Test(dependsOnMethods = {"connect"})
  public void callArrayArg() throws IOException, UnsupportedWampActionException, TimeoutException, CallException{
    WampArguments msg = wamp.simpleCall("arrayArgs");
   
    assertEquals( 10 , msg.nextObject(int.class).intValue() );
    assertEquals( 11 , msg.nextObject(int.class).intValue() );
    assertEquals( 12 , msg.nextObject(int.class).intValue() );
    assertEquals( 13 , msg.nextObject(int.class).intValue() );
    assertTrue(!msg.hasNext());
  }
 
View Full Code Here

  public void callArrayArg() throws IOException, UnsupportedWampActionException, TimeoutException, CallException{
    WampArguments msg = wamp.simpleCall("arrayArgs");
   
    assertEquals( 10 , msg.nextObject(int.class).intValue() );
    assertEquals( 11 , msg.nextObject(int.class).intValue() );
    assertEquals( 12 , msg.nextObject(int.class).intValue() );
    assertEquals( 13 , msg.nextObject(int.class).intValue() );
    assertTrue(!msg.hasNext());
  }
 
  @Test(dependsOnMethods = {"connect"})
View Full Code Here

    WampArguments msg = wamp.simpleCall("arrayArgs");
   
    assertEquals( 10 , msg.nextObject(int.class).intValue() );
    assertEquals( 11 , msg.nextObject(int.class).intValue() );
    assertEquals( 12 , msg.nextObject(int.class).intValue() );
    assertEquals( 13 , msg.nextObject(int.class).intValue() );
    assertTrue(!msg.hasNext());
  }
 
  @Test(dependsOnMethods = {"connect"})
  public void throwCallExceptionOncall() throws IOException, UnsupportedWampActionException, TimeoutException{
View Full Code Here

      wamp.simpleCall("CallException");
      fail("No CallException thrown");
    } catch(CallException ce){
      assertEquals( "Test error" , ce.getErrorDescription() );
      WampArguments args = (WampArguments)ce.getErrorDetails();
      assertEquals( "details" , args.nextObject().asString() );
    }
   
  }
 
  @Test(dependsOnMethods = {"connect"})
View Full Code Here

      //TODO not use this, keep raw data and send them or convert them is need (msgPack => JSON or JSON => msgPack)
      else if(arg instanceof WampArguments){
        WampArguments wampArg = (WampArguments)arg;
        List<Object> list = new ArrayList<Object>();
        while(wampArg.hasNext())
          list.add(wampArg.nextObject(Object.class));
       
        argList = list;
      }
      else
        this.arg = arg;
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.