public void ValidateRequest_Success(string request)
        {
            ValidationOfRequest validation = new ValidationOfRequest();

            var result = validation.ValidateRequest(request);

            Assert.IsTrue(result);
        }
        public void ValidateRequest_Errors(string request)
        {
            ValidationOfRequest validation = new ValidationOfRequest();

            var result = validation.ValidateRequest(request);

            Assert.IsFalse(result);
        }
        public void ValidateRequest_PassTheCheck_ReturnFalse()
        {
            string stringRequest = "POStT/resurs/1";
            var    validation    = new ValidationOfRequest();

            var result = validation.ValidateRequest(stringRequest);

            Assert.IsFalse(result);
        }
        public void ValidateRequest_ResourceNameDoesNotExist_ReturnFalse()
        {
            string stringRequest = "GET/";

            ValidationOfRequest validation = new ValidationOfRequest();
            var result = validation.ValidateRequest(stringRequest);


            Assert.IsFalse(result);
        }
        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;
        }