public void ThrowArgumentNullException_WhenContentIsEmpty(Protocol.TransferProtocolSender protocol, TransferProtocolVefify protocolVerify) { Func <Task> action = () => protocol.Send(_uri, new byte[0]); action.Should().Throw <ArgumentNullException>(); }
public void ThrowArgumentNullException_WhenUriIsEmpty(Protocol.TransferProtocolSender protocol, TransferProtocolVefify protocolVerify) { Func <Task> action = () => protocol.Send(string.Empty, new byte[1]); action.Should().Throw <ArgumentNullException>(); }
public async Task ReturnTheResponse(Protocol.TransferProtocolSender protocol, TransferProtocolVefify protocolVerify) { protocolVerify.SetupResponse(_anyObject); var responseBytes = await protocol.Send(_uri, _anyByte); var response = TestSerializer.Deserialize <AnyObject>(responseBytes); response.Should().BeOfType <AnyObject>(); response.anyInt.Should().Be(_anyObject.anyInt); response.anyString.Should().Be(_anyObject.anyString); }
public async Task SendTheContent(Protocol.TransferProtocolSender protocol, TransferProtocolVefify protocolVerify) { await protocol.Send(_uri, TestSerializer.Serialize(_anyObject)); protocolVerify.Content <AnyObject>(_anyObject); }
public async Task SendToTheUri(Protocol.TransferProtocolSender protocol, TransferProtocolVefify protocolVerify) { await protocol.Send(_uri, _anyByte); protocolVerify.Uri(_uri); }