Package com.eviware.soapui.impl.wsdl.testcase

Examples of com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext


    @Test
    public void testProvider()
    {
        CurrentRunStepIndexProvider provider = new CurrentRunStepIndexProvider();

        WsdlTestRunContext context = Mockito.mock(WsdlTestRunContext.class);
        AbstractTestCaseRunner runner = Mockito.mock(AbstractTestCaseRunner.class);
        Mockito.when( runner.getResultCount()).thenReturn( 3 );

        Mockito.when( context.getTestRunner()).thenReturn(runner);

        Assert.assertEquals( "3", provider.getValue( context ));
    }
View Full Code Here


        resultList.add( mockResult2 );
        resultList.add( mockResult2 );
        resultList.add( mockResult1 );
        resultList.add( mockResult2 );

        WsdlTestRunContext context = Mockito.mock(WsdlTestRunContext.class);
        AbstractTestCaseRunner runner = Mockito.mock(AbstractTestCaseRunner.class);
        Mockito.when( context.getTestRunner() ).thenReturn( runner );
        Mockito.when( runner.getResults()).thenReturn( resultList );

        Mockito.when( context.getCurrentStep()).thenReturn(mockStep1);
        Assert.assertEquals( "2", provider.getValue( context ));

        Mockito.when( context.getCurrentStep()).thenReturn(mockStep2);
        Assert.assertEquals( "3", provider.getValue( context ));
    }
View Full Code Here

                    exchange = new WsdlMockResponseMessageExchange(((WsdlMockResponseTestStep) testStep).getMockResponse());
                }

                try {
                    setScriptText(editor.getEditArea().getText());
                    String result = assertScript(exchange, new WsdlTestRunContext(testStep), logger);
                    UISupport
                            .showInfoMessage("Script Assertion Passed" + ((result == null) ? "" : ": [" + result + "]"));
                } catch (AssertionException e) {
                    UISupport.showErrorMessage(e.getMessage());
                } catch (Exception e) {
View Full Code Here

                    UISupport.showErrorMessage("Missing content!!");
                    setAssertionParameters(oldPath, oldContent, oldAllowWildcards);
                    return;
                }
                String msg = assertion.assertContent(assertableContent,
                        new WsdlTestRunContext(assertion.getAssertable().getTestStep()), "Response");
                UISupport.showInfoMessage(msg, "Success");
            } catch (AssertionException e) {
                UISupport.showErrorMessage(e.getMessage());
            }
            setAssertionParameters(oldPath, oldContent, oldAllowWildcards);
View Full Code Here

            String txt = pathArea == null || !pathArea.isVisible() ? getPath() : pathArea.getSelectedText();
            if (txt == null) {
                txt = pathArea == null ? "" : pathArea.getText();
            }

            WsdlTestRunContext context = new WsdlTestRunContext(getAssertable().getTestStep());

            String expandedPath = PropertyExpander.expandProperties(context, txt.trim());

            JTextArea contentArea = getContentArea();
            if (contentArea != null && contentArea.isVisible()) {
View Full Code Here

            if (assertion == null) {
                return null;
            }

            if (getResponse() != null) {
                assertion.assertResponse(new WsdlResponseMessageExchange(this), new WsdlTestRunContext(testStep));
                notifier.notifyChange();
            }

            return assertion;
        } catch (Exception e) {
View Full Code Here

            }
        }
        if (event.getPropertyName().equals(TestAssertion.CONFIGURATION_PROPERTY)
                || event.getPropertyName().equals(TestAssertion.DISABLED_PROPERTY)) {
            if (getTestRequest().getResponse() != null) {
                getTestRequest().assertResponse(new WsdlTestRunContext(this));
            }
        } else {
            if (event.getSource() == testRequest && event.getPropertyName().equals(WsdlTestRequest.NAME_PROPERTY)) {
                if (!super.getName().equals(event.getNewValue())) {
                    super.setName((String) event.getNewValue());
View Full Code Here

                        || !XmlUtils.seemsToBeXml(previousStep.getTestRequest().getResponse().getContentAsXml())) {
                    UISupport.showErrorMessage("Missing response in previous message");
                    return;
                }

                WsdlTestRunContext context = new WsdlTestRunContext(gotoStep);
                GotoCondition target = gotoStep.runConditions(previousStep, context);
                if (target == null) {
                    logList.addLine("No condition true for current response in [" + previousStep.getName() + "]");
                } else {
                    logList.addLine("Condition triggered for go to [" + target.getTargetStep() + "]");
View Full Code Here

                    return;
                }

                try {
                    GotoCondition condition = gotoStep.getConditionAt(conditionList.getSelectedIndex());
                    WsdlTestRunContext context = new WsdlTestRunContext(gotoStep);
                    boolean evaluate = condition.evaluate(previousStep, context);
                    if (!evaluate) {
                        UISupport.showInfoMessage("Condition not true for current response in [" + previousStep.getName()
                                + "]");
                    } else {
View Full Code Here

    @Override
    protected Submit doSubmit() throws SubmitException {
        Analytics.trackAction(SoapUIActions.RUN_TEST_STEP.getActionName(), "StepType", "HTTP");

        return getRequest().submit(new WsdlTestRunContext(getModelItem()), true);
    }
View Full Code Here

TOP

Related Classes of com.eviware.soapui.impl.wsdl.testcase.WsdlTestRunContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.