Class MockConnectionRegistry

java.lang.Object
io.bestquality.protocol.mock.MockConnectionRegistry

public class MockConnectionRegistry
extends java.lang.Object
  • Constructor Summary

    Constructors 
    Constructor Description
    MockConnectionRegistry()  
  • Method Summary

    Modifier and Type Method Description
    static void clearMockConnections()
    Should be called at the end of each test run (i.e.
    static java.net.URLConnection findMockConnection​(java.net.URL url)  
    static void installProtocolHandlers()  
    static void registerMockConnection​(java.net.URLConnection connection)  
    static void registerMockConnection​(java.util.regex.Pattern pattern, java.net.URLConnection connection)  

    Methods inherited from class java.lang.Object

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

  • Method Details

    • installProtocolHandlers

      public static void installProtocolHandlers()
    • findMockConnection

      public static java.net.URLConnection findMockConnection​(java.net.URL url) throws java.io.IOException
      Throws:
      java.io.IOException
    • registerMockConnection

      public static void registerMockConnection​(java.util.regex.Pattern pattern, java.net.URLConnection connection)
    • registerMockConnection

      public static void registerMockConnection​(java.net.URLConnection connection)
    • clearMockConnections

      public static void clearMockConnections()
      Should be called at the end of each test run (i.e. @After)