Code example for JsonArray

Methods: add

0
    context = Mockito.mock( JsonDeserializationContext.class );
    deserializer = new OperationDeserializer();
  } 
 
  private JsonArray setupCallOperation() {
    JsonArray array = new JsonArray();
    array.add( new JsonPrimitive( "call" ) );
    array.add( new JsonPrimitive( "w2" ) );
    array.add( new JsonPrimitive( "rwt.widgets.Shell" ) );
    return array;
  } 
 
  @Test 
  public void testCreateCallOperation() { 
    JsonArray array = setupCallOperation();
 
    Operation op = deserializer.deserialize( array, type, context );
 
    assertNotNull( op );
    assertTrue( op instanceof CallOperation );
Contextual code suggestions in your IDE  Get Codota for Java