net.javacrumbs.mocksocket.connection.matcher
Class MatcherBasedMockConnection
java.lang.Object
net.javacrumbs.mocksocket.connection.AbstractMockConnection
net.javacrumbs.mocksocket.connection.matcher.MatcherBasedMockConnection
- All Implemented Interfaces:
- Connection, MatcherBasedMockRecorder, MatcherBasedMockResultRecorder, MockConnection
public class MatcherBasedMockConnection
- extends AbstractMockConnection
- implements MockConnection, MatcherBasedMockResultRecorder, MatcherBasedMockRecorder
Mock connection that is based on Matchers.
- Author:
- Lukas Krecan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MatcherBasedMockConnection
public MatcherBasedMockConnection(String address)
getInputStream
public InputStream getInputStream()
throws IOException
- Specified by:
getInputStream in interface Connection
- Throws:
IOException
thenReturn
public MatcherBasedMockRecorder thenReturn(byte[] data)
- Specified by:
thenReturn in interface MatcherBasedMockRecorder- Specified by:
thenReturn in interface MatcherBasedMockResultRecorder
andWhenPayload
public MatcherBasedMockResultRecorder andWhenPayload(org.hamcrest.Matcher<byte[]> matcher)
- Specified by:
andWhenPayload in interface MatcherBasedMockRecorder
Copyright © 2011. All Rights Reserved.