public void Test6() { ISqlQueryExecutor sqlQueryExecutor = new SqlExecutorMock(); CommunicationBusModule cbm = new CommunicationBusModule(sqlQueryExecutor); string json = "{\"Verb\": \"PATCH\",\"Noun\": \"Resources/2\",\"Query\": \"name='pera'\",\"Fields\": \"*\"}"; string response = cbm.SendRequest(json); Assert.IsNotNull(response); }
private void Button_Click(object sender, RoutedEventArgs e) { ValidationOfRequest validation = new ValidationOfRequest(); if (!validation.ValidateRequest(TextBoxEnter.Text)) { MessageBox.Show("Pls enter valid request."); return; } Request request = RequestFactory.ConvertStringToRequest(TextBoxEnter.Text); string json = JsonConvert.SerializeObject(request, Formatting.Indented); JsonFormat.Text = json; CommunicationBusModule cmb = new CommunicationBusModule(); string response = cmb.SendRequest(json); XmlFormat.Text = cmb.XmlRequest.ToString(); txtBoxResponse.Text = response; }