Beispiel #1
0
        public async void MDeleteAsyncTest()
        {
            var indexes = new JArray {
                "foo", "bar", "zoo"
            };

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

            Assert.Equal(
                indexes,
                await _indexController.MDeleteAsync(indexes),
                new JTokenEqualityComparer()
                );

            _api.Verify(new JObject {
                { "controller", "index" },
                { "action", "mDelete" },
                { "body", new JObject {
                      { "indexes", indexes }
                  } }
            });
        }