예제 #1
0
            public void single_func_should_get_single_json_format()
            {
                var jsonController = new JsonController();
                var nameValueCollection = new NameValueCollection();

                jsonController.RequestRepository = _requestRepoMock.Object;

                var ret = jsonController.SingleJson();
                Assert.True(ret.IsContentActionResult());
                Assert.Equal("{\"result\":0,\"desc\":\"成功\",\"host\":null,\"data\":{\"id\":1,\"name\":\"tag1\",\"parentid\":null,\"parentname\":null}}", ret.ContentResultData());
            }