Spy.addExecutedStatement
Code IndexAdd Codota to your IDE (free)

Best code snippets using io.sniffy.Spy.addExecutedStatement(Showing top 2 results out of 315)

origin: sniffy/sniffy

private static void notifyListeners(StatementMetaData statementMetaData, long elapsedTime, int bytesDown, int bytesUp, int rowsUpdated) {
  Iterator<WeakReference<Spy>> iterator = registeredSpies.iterator();
  while (iterator.hasNext()) {
    WeakReference<Spy> spyReference = iterator.next();
    Spy spy = spyReference.get();
    if (null == spy) {
      iterator.remove();
    } else {
      spy.addExecutedStatement(statementMetaData, elapsedTime, bytesDown, bytesUp, rowsUpdated);
    }
  }
  Long threadId = Thread.currentThread().getId();
  WeakReference<CurrentThreadSpy> spyReference = currentThreadSpies.get(threadId);
  if (null != spyReference) {
    CurrentThreadSpy spy = spyReference.get();
    if (null == spy) {
      currentThreadSpies.remove(threadId);
    } else {
      spy.addExecutedStatement(statementMetaData, elapsedTime, bytesDown, bytesUp, rowsUpdated);
    }
  }
}
origin: sniffy/sniffy

private static void notifyListeners(StatementMetaData statementMetaData, long elapsedTime, int bytesDown, int bytesUp, int rowsUpdated) {
  Iterator<WeakReference<Spy>> iterator = registeredSpies.iterator();
  while (iterator.hasNext()) {
    WeakReference<Spy> spyReference = iterator.next();
    Spy spy = spyReference.get();
    if (null == spy) {
      iterator.remove();
    } else {
      spy.addExecutedStatement(statementMetaData, elapsedTime, bytesDown, bytesUp, rowsUpdated);
    }
  }
  Long threadId = Thread.currentThread().getId();
  WeakReference<CurrentThreadSpy> spyReference = currentThreadSpies.get(threadId);
  if (null != spyReference) {
    CurrentThreadSpy spy = spyReference.get();
    if (null == spy) {
      currentThreadSpies.remove(threadId);
    } else {
      spy.addExecutedStatement(statementMetaData, elapsedTime, bytesDown, bytesUp, rowsUpdated);
    }
  }
}
io.sniffySpyaddExecutedStatement

Popular methods of Spy

  • expect
  • close
    Alias for #verify() method; it is useful for try-with-resource API: @Test public void testTryWi
  • execute
  • call
    Executes the Callable#call() method on provided argument and verifies the expectations
  • expectAtLeast
  • expectAtMostOnce
  • getExecutedStatements
  • getSocketOperations
  • run
    Executes the Runnable#run() method on provided argument and verifies the expectations
  • verify
  • addReturnedRow
  • addSocketOperation
  • addReturnedRow,
  • addSocketOperation,
  • checkOpened,
  • expectAtMost,
  • expectBetween,
  • expectNever,
  • getSniffyAssertionError,
  • self,
  • verifyAndAddToException

Popular classes and methods

  • getSharedPreferences (Context)
  • findViewById (Activity)
  • Window (java.awt)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Socket (java.net)
    Provides a client-side TCP socket.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Collections (java.util)
    Collections contains static methods which operate on Collection classes.
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)