public void GetScans( [Frozen] Mock <IHttpClient> httpClientMock, [Greedy] SpiderComponent sut, IEnumerable <SpiderScan> scans) { // ARRANGE var json = new JObject( new JProperty("scans", JArray.FromObject(scans))); httpClientMock.SetupApiCall(sut, CallType.View, "scans") .Returns(json.ToString()) .Verifiable(); // ACT var result = sut.GetScans(); // ASSERT result.ShouldBeEquivalentTo(scans); httpClientMock.Verify(); }