public void Scan( [Frozen] Mock <IHttpClient> httpClientMock, [Greedy] SpiderComponent sut, string url, int maxChildren, int scanId) { // ARRANGE var json = new JObject( new JProperty("scan", scanId)); httpClientMock.SetupApiCall(sut, CallType.Action, "scan", new Parameters { { "url", url }, { "maxChildren", maxChildren } }) .Returns(json.ToString()) .Verifiable(); // ACT var result = sut.Scan(url, maxChildren); // ASSERT result.Should().Be(scanId); httpClientMock.Verify(); }