Package zendeskapi.models.macros

Examples of zendeskapi.models.macros.Macro


    Assert.assertTrue(API.getMacros().getAllMacros().getMacros().size() > 0);
  }
 
  @Test
  public void testGetMacroById() throws Exception {
    Macro macro = API.getMacros().getAllMacros().getMacros().get(0);
    Assert.assertTrue(API.getMacros().getMacroById(macro.getId()).getMacro().getId() > 0);
  }
View Full Code Here


    Assert.assertTrue(API.getMacros().getMacroById(macro.getId()).getMacro().getId() > 0);
  }
 
  @Test
  public void testCreateUpdateApplyAndDeleteMacro() throws Exception {
    Macro macro = new Macro();
    macro.setTitle("Test Macro 1");
    List<Action> actions = new ArrayList<Action>();
    Action action = new Action();
    action.setField("status");
    action.setValue("open");
    actions.add(action);
    macro.setActions(actions);
   
    // Create
    Macro responseMacro = API.getMacros().createMacro(macro).getMacro();
    Assert.assertTrue(responseMacro.getId() > 0);
   
    // Update
    responseMacro.setTitle("Test Macro 2");
    Macro updateMacro = API.getMacros().updateMacro(responseMacro).getMacro();
    Assert.assertEquals(updateMacro.getId(), responseMacro.getId());
   
    // Apply
    Ticket ticket = new Ticket();
    ticket.setSubject("Macro test ticket");
    ticket.setDescription("Testing macros");
View Full Code Here

TOP

Related Classes of zendeskapi.models.macros.Macro

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.