Package com.google.api.explorer.client.base.ApiDirectory

Examples of com.google.api.explorer.client.base.ApiDirectory.ServiceDefinition


  /**
   * Test that a blacklisted API doesn't show up in the directory list.
   */
  public void testDirectoryBlacklist() {
    ServiceDefinition toFilter = EasyMock.createMock(ServiceDefinition.class);
    EasyMock.expect(toFilter.getName()).andReturn("drive").atLeastOnce();
    EasyMock.expect(toFilter.getId()).andReturn("drive:v1").atLeastOnce();

    ServiceDefinition toLeave = EasyMock.createMock(ServiceDefinition.class);
    EasyMock.expect(toLeave.getName()).andReturn("drive").atLeastOnce();
    EasyMock.expect(toLeave.getId()).andReturn("drive:v2").atLeastOnce();

    final Set<ServiceDefinition> directory = ImmutableSet.of(toFilter, toLeave);
    ApiServiceFactory mockDirectory = EasyMock.createMock(ApiServiceFactory.class);

    final Capture<AsyncCallback<Set<ServiceDefinition>>> cbCapture =
View Full Code Here


*/
public class SearchEntryTest extends TestCase {

  /** Test the function which returns a view with additional keywords. */
  public void testKeywordAddition() {
    ServiceDefinition service = EasyMock.createMock(ServiceDefinition.class);
    EasyMock.expect(service.getId()).andReturn(null).anyTimes();
    SearchResult emptyResult = SearchResult.createServiceResult(service);

    EasyMock.replay(service);

    SearchEntry emptyEntry = new SearchEntry(emptyResult, Collections.<String>emptySet());
View Full Code Here

TOP

Related Classes of com.google.api.explorer.client.base.ApiDirectory.ServiceDefinition

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.