public void SubmitMessagesToQueue_OneMessage_SubmitSuccessfully()
{
var messageServiceClientMock = new Mock();
var queueableMess
Had one of these as well, but the parameter of the action was an interface with no public properties. Ended up using It.Is() with a seperate method and within this method had to do some mocking of the interface
public interface IQuery
{
IQuery SetSomeFields(string info);
}
void DoSomeQuerying(Action queryThing);
mockedObject.Setup(m => m.DoSomeQuerying(It.Is>(q => MyCheckingMethod(q)));
private bool MyCheckingMethod(Action queryAction)
{
var mockQuery = new Mock();
mockQuery.Setup(m => m.SetSomeFields(It.Is(s => s.MeetsSomeCondition())
queryAction.Invoke(mockQuery.Object);
mockQuery.Verify(m => m.SetSomeFields(It.Is(s => s.MeetsSomeCondition(), Times.Once)
return true
}