Class FakeApiService

java.lang.Object
com.google.api.core.AbstractApiService
com.google.cloud.pubsublite.internal.testing.FakeApiService
All Implemented Interfaces:
com.google.api.core.ApiService

public abstract class FakeApiService extends com.google.api.core.AbstractApiService
Fake Pub/Sub Lite service for testing. Used like:
 static abstract class SubscriberFakeService extends FakeApiService implements Subscriber {};
 @Spy private SubscriberFakeService wireSubscriber;
 
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.google.api.core.ApiService

    com.google.api.core.ApiService.Listener, com.google.api.core.ApiService.State
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
     
    protected void
     
    void
     

    Methods inherited from class com.google.api.core.AbstractApiService

    addListener, awaitRunning, awaitRunning, awaitTerminated, awaitTerminated, failureCause, isRunning, notifyFailed, notifyStarted, notifyStopped, startAsync, state, stopAsync

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FakeApiService

      public FakeApiService()
  • Method Details

    • fail

      public void fail(Throwable t)
    • doStart

      protected void doStart()
      Specified by:
      doStart in class com.google.api.core.AbstractApiService
    • doStop

      protected void doStop()
      Specified by:
      doStop in class com.google.api.core.AbstractApiService