Пример #1
0
        private Root GetRootModelFromBuild(Build b)
        {
            var server = new Isop.Server.IsopServerFromBuild(() => b);
            var data   = JsonConvert.SerializeObject(server.GetModel());
            var client = new IsopClient(new JsonHttpClientThatOnlyReturns(data), "http://localhost:666");

            return(client.GetModel().Result);
        }
        private RootViewModel RootVmWithMethodSelected()
        {
            A.CallTo(() => _jsonHttpClient.Request(A <Request> ._))
            .Returns(new JsonResponse(System.Net.HttpStatusCode.OK, JsonConvert.SerializeObject(
                                          RootModelFromSource())));

            var mt        = _isopClient.GetModel().Result;
            var treemodel = new RootViewModel(new JsonClient(_isopClient), mt);

            treemodel.CurrentMethod = treemodel.Controllers.Single()
                                      .Methods.Single(m => m.Name == "Action");
            return(treemodel);
        }