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; }
public MainWindow() { MethodTreeModel = new RootViewModel(); InitializeComponent(); selectClient = new SelectClient(); selectClient.Source.Loaded += Source_Loaded; var empty = new EmptyMethodViewModel(); ResultBlock.DataContext = empty; HelpBlock.DataContext = empty; paramview.Source = MethodTreeModel.GlobalParameters; controllersAndCommands.DataContext = MethodTreeModel.Controllers; var conn = new IsopClient(new JsonHttpClient(), ConfigurationManager.AppSettings["server_url"]); InitFromClient(new JsonClient(conn), _ => { var assemblies = new LoadAssemblies().LoadFrom(ExecutionAssembly.Path()).ToArray(); var build = new Build(); foreach (var assembly in assemblies) { build.ConfigurationFrom(assembly); } InitFromClient(new BuildClient(build)); }); }
public void SetUp() { _jsonHttpClient = A.Fake<IJSonHttpClient>(); _isopClient = new IsopClient(_jsonHttpClient, "http://localhost:666"); }