TeamcityServerClientImpl implements TeamcityServerClient { @Override public <T> T getResource(Class<T> resourceClass) { T teamcityServerResource = JAXRSClientFactory.fromClient(client, resourceClass); return teamcityServerResource; } TeamcityServerClientImpl(String basePath, String username, String password); @Override T getResource(Class<T> resourceClass);  }
@Test @Ignore public void testGetResource() throws Exception { TeamcityServerClient teamcityServerClient = new TeamcityServerClientImpl("http: "presidentio", "wrong_password"); AppRestBuildQueueResource queueResource = teamcityServerClient.getResource(AppRestBuildQueueResource.class); }
@Test @Ignore public void testGetVcsRoot() throws Exception { TeamcityServerClient teamcityServerClient = new TeamcityServerClientImpl("http: "presidentio", "wrong_password"); AppRestBuildTypesResource buildTypesResource = teamcityServerClient.getResource(AppRestBuildTypesResource.class); System.out.println(buildTypesResource.getVcsRootEntries("prairie_test", null)); }
@Test @Ignore public void testCancelBuild() throws Exception { TeamcityServerClient teamcityServerClient = new TeamcityServerClientImpl("http: "presidentio", "wrong_password"); AppRestBuildQueueResource buildQueueResource = teamcityServerClient.getResource(AppRestBuildQueueResource.class); AppRestBuildsResource buildsResource = teamcityServerClient.getResource(AppRestBuildsResource.class); buildsResource.cancelBuild("527", null, new BuildCancelRequest()); }