Hello,
Can someone explain me why the first test is passing, while the second one is failing.
(the message is not modified at all in the _ips.ProcessRequest())
I guess that's linked with the way Nsubsitute evaluates the calls..
Thanks
[TestMethod, TestCategory("ips-22")]
public void ProcessRequest_ValidMessage_LogsInfo()
{
var message = new CloudQueueMessage(_validMessageRequest);
var rawMessage = message.AsString;
_ips.ProcessRequest(message, _inboundQueue).Wait();
// validates that the logger gets a call on info, with the message contents in
_logger.Received(1).Info(Arg.Is<string>(s => s.Contains(rawMessage)));
}
[TestMethod, TestCategory("ips-22")]
public void ProcessRequest_ValidMessage_LogsInfo2()
{
var message = new CloudQueueMessage(_validMessageRequest);
//var rawMessage = message.AsString;
_ips.ProcessRequest(message, _inboundQueue).Wait();
// validates that the logger gets a call on info, with the message contents in
_logger.Received(1).Info(Arg.Is<string>(s => s.Contains(message.AsString)));
}