Ejemplo n.º 1
0
        public async void ListAsyncTest()
        {
            var indexes = new JArray {
                "foo", "bar", "zoo"
            };

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

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

            _api.Verify(new JObject {
                { "controller", "index" },
                { "action", "list" },
            });
        }