public async void GetSpecificationsAsyncTest() { var expected = JObject.Parse(@" { collection: 'bar', index: 'foo', validation: { fields: { fields: 'data' }, strict: true } }"); _api.SetResult(new JObject { { "result", expected } }); JObject mappings = await _collectionController.GetSpecificationsAsync("foo", "bar"); _api.Verify(new JObject { { "controller", "collection" }, { "action", "getSpecifications" }, { "index", "foo" }, { "collection", "bar" } }); Assert.Equal( expected["validation"], mappings, new JTokenEqualityComparer()); }