Package com.google.greaze.end2end.definition

Examples of com.google.greaze.end2end.definition.QueryEmployeeByName


          queryHandler, gsonBuilder, urlPaths, queryPath, null);
    ResourceQueryClient<Employee, QueryEmployeeByName> queryClient =
        new ResourceQueryClient<Employee, QueryEmployeeByName>(
            stub, queryPath, QueryEmployeeByName.class, gsonBuilder, Employee.class, false);

    QueryEmployeeByName queryByName = new QueryEmployeeByName("foo");
    List<Employee> results = queryClient.query(queryByName, new WebContext());
    assertEquals(2, results.size());
    for (Employee employee : results) {
      assertEquals("foo", employee.getName());
    }
View Full Code Here


      assertEquals("foo", employee.getName());
    }
  }

  public void testParamsRoundTripWithVersion() throws Exception {
    List<Employee> results = queryClient.query(new QueryEmployeeByName("foo"), new WebContext());
    assertEquals(2, results.size());
    for (Employee employee : results) {
      assertEquals("foo", employee.getName());
    }
  }
View Full Code Here

          queryHandler, gsonBuilder, urlPaths, queryPath, null);
    ResourceQueryClient<Employee, QueryEmployeeByName> queryClient =
        new ResourceQueryClient<Employee, QueryEmployeeByName>(
            stub, queryPath, QueryEmployeeByName.class, gsonBuilder, Employee.class, true);

    QueryEmployeeByName queryByName = new QueryEmployeeByName("foo");
    List<Employee> results = queryClient.query(queryByName, new WebContext());
    assertEquals(2, results.size());
    for (Employee employee : results) {
      assertEquals("foo", employee.getName());
    }
View Full Code Here

    }
  }

  public void testQueryWithAServerError() {
    try {
      queryClient.query(new QueryEmployeeByName(BAD_EMPLOYEE), new WebContext());
      fail();
    } catch (WebServiceSystemException expected) {
      assertEquals(ErrorReason.BAD_REQUEST, expected.getReason());
    }
  }
View Full Code Here

TOP

Related Classes of com.google.greaze.end2end.definition.QueryEmployeeByName

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.