Package zendeskapi.models.categories

Examples of zendeskapi.models.categories.GroupCategoryResponse


  @Test
  public void testGetCategories() throws Exception {
    createCategories();
    Categories categories = API.getCategories();
    GroupCategoryResponse groupCategoryResponse = categories.getCategories();
    Assert.assertEquals(groupCategoryResponse.getCategories().size(), 3);
    Category category = groupCategoryResponse.getCategories().get(0);
    Assert.assertEquals(category.getName(), "Test category name 1");
    Assert.assertEquals(category.getDescription(), "Test category description 1");
    category = groupCategoryResponse.getCategories().get(1);
    Assert.assertEquals(category.getName(), "Test category name 2");
    Assert.assertEquals(category.getDescription(), "Test category description 2");
    category = groupCategoryResponse.getCategories().get(2);
    Assert.assertEquals(category.getName(), "Test category name 3");
    Assert.assertEquals(category.getDescription(), "Test category description 3");   
  }
View Full Code Here


  @Test
  public void testGetCategoryById() throws Exception {
    createCategories();
    Categories categories = API.getCategories();
    GroupCategoryResponse groupCategoryResponse = categories.getCategories();
    for (Category category : groupCategoryResponse.getCategories()) {
      IndividualCategoryResponse individualCategoryResponse = categories.getCategoryById(category.getId());
      Category responseCategory = individualCategoryResponse.getCategory();
      Assert.assertEquals(responseCategory.getId(), category.getId());
      Assert.assertEquals(responseCategory.getName(), category.getName());
      Assert.assertEquals(responseCategory.getDescription(), category.getDescription());
View Full Code Here

  @Test
  public void testUpdateCategory() throws Exception {
    createCategories();
    Categories categories = API.getCategories();
    GroupCategoryResponse groupCategoryResponse = categories.getCategories();
    Category category = groupCategoryResponse.getCategories().get(0);
    category.setDescription("Test updated description 1");
    IndividualCategoryResponse individualCategoryResponse = categories.updateCategory(category);
    Category responseCategory = individualCategoryResponse.getCategory();
    Assert.assertEquals(responseCategory.getDescription(), category.getDescription());
  }
View Full Code Here

TOP

Related Classes of zendeskapi.models.categories.GroupCategoryResponse

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.