示例#1
0
        private void saveDbSoap_Click(object sender, RoutedEventArgs e)
        {
            var testcase = new Test
            {
                Request        = txtboxSoapRequest.Text,
                Response       = txtboxSoapResponse.Text,
                ProcessingTime = TimeSpan.Parse(timeProcessing_Soap.Text),
                Uri            = txtboxUrlSoap.Text,
                UserId         = User.Id,
                ServiceName    = User.ServiceName
            };


            if (TestsController.InsertInDB(testcase))
            {
                MessageBox.Show("TestCase saved.");
            }
            else
            {
                MessageBox.Show("Error.");
            }
        }
示例#2
0
        private void saveDbRest_Click(object sender, RoutedEventArgs e)
        {
            var testcase = new Test
            {
                Request        = txtboxRestRequest.Text,
                Response       = txtboxRestResponse.Text,
                ProcessingTime = TimeSpan.Parse(timeProcessing_Rest.Text),
                Uri            = txtboxUrlRest.Text,
                UserId         = User.Id,
                ServiceName    = User.ServiceName,
                Method         = dropdownMethod.Text,
                Params         = txtboxParams.Text,
                ContentType    = contentTypeList.Text
            };

            if (TestsController.InsertInDB(testcase))
            {
                MessageBox.Show("TestCase saved.");
            }
            else
            {
                MessageBox.Show("Error.");
            }
        }