Examples of ExplorerContext


Examples of com.google.api.explorer.client.context.ExplorerContext

    assertTrue(cbCapture.hasCaptured());

    cbCapture.getValue().onSuccess(items);

    assertTrue(contextCapture.hasCaptured());
    ExplorerContext ctxt = contextCapture.getValue();

    assertTrue(ctxt.isEntryListVisible());
    assertEquals(Collections.emptySet(), ctxt.getServicesList());
    assertEquals(RootNavigationItem.PREFERRED_SERVICES, ctxt.getRootNavigationItem());

    EasyMock.verify(delegate, serviceLoader);
  }
View Full Code Here

Examples of com.google.api.explorer.client.context.ExplorerContext

    // This call completes the service load to generate the context.
    cbCapture.getValue().onSuccess(service);

    assertTrue(contextCapture.hasCaptured());
    ExplorerContext ctxt = contextCapture.getValue();

    assertEquals(service, ctxt.getService());
    assertTrue(ctxt.isEntryListVisible());
    assertEquals(RootNavigationItem.ALL_VERSIONS, ctxt.getRootNavigationItem());

    EasyMock.verify(serviceLoader, delegate, service);
  }
View Full Code Here

Examples of com.google.api.explorer.client.context.ExplorerContext

    // This call generated the context.
    cbCapture.getValue().onSuccess(service);

    assertTrue(contextCapture.hasCaptured());
    ExplorerContext ctxt = contextCapture.getValue();

    assertEquals(service, ctxt.getService());
    assertEquals(method, ctxt.getMethod());
    assertTrue(ctxt.isMethodFormVisible());
    assertFalse(ctxt.isEntryListVisible());
    assertEquals(RootNavigationItem.ALL_VERSIONS, ctxt.getRootNavigationItem());

    EasyMock.verify(serviceLoader, delegate, service);
  }
View Full Code Here

Examples of com.google.api.explorer.client.context.ExplorerContext

    EasyMock.replay(resultIndex, delegate);

    manager.processUrl("search/" + searchTerm + "/");

    assertTrue(contextCapture.hasCaptured());
    ExplorerContext ctxt = contextCapture.getValue();

    assertTrue(Iterables.isEmpty(ctxt.getSearchResults()));
    assertTrue(ctxt.isSearchResultsVisible());
    assertEquals(RootNavigationItem.NONE, ctxt.getRootNavigationItem());

    // This will invoke the second calls of search and setContext.
    manager.searchReady();

    EasyMock.verify(resultIndex, delegate);
View Full Code Here

Examples of com.google.api.explorer.client.context.ExplorerContext

    EasyMock.replay(event, analyticsManager, historyCache, delegate);

    manager.onValueChange(event);

    assertTrue(contextCapture.hasCaptured());
    ExplorerContext ctxt = contextCapture.getValue();

    assertEquals(item, Iterables.getOnlyElement(ctxt.getHistoryItems()));
    assertTrue(ctxt.isHistoryItemVisible());
    assertEquals(RootNavigationItem.REQUEST_HISTORY, ctxt.getRootNavigationItem());

    EasyMock.verify(event, analyticsManager, historyCache, delegate);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.