예제 #1
0
        public async void GetMappingAsyncTest()
        {
            var expected = JObject.Parse(@"
      {
        some: 'mappings'
      }");

            _api.SetResult(new JObject {
                { "result", expected }
            });

            JObject mappings =
                await _collectionController.GetMappingAsync("foo", "bar");

            _api.Verify(new JObject {
                { "controller", "collection" },
                { "action", "getMapping" },
                { "index", "foo" },
                { "collection", "bar" }
            });

            Assert.Equal(
                expected,
                mappings,
                new JTokenEqualityComparer());
        }