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); }
public async Task <Isop.Client.Transfer.Root> GetModel() { var response = await JsonClient.Request(new Request(BasePath, r => r.Get())); return(JsonConvert.DeserializeObject <Isop.Client.Transfer.Root>(response.Data)); }