Package com.eviware.soapui.config

Examples of com.eviware.soapui.config.TestAssertionConfig


        int mod = 0;

        List<TestAssertionConfig> assertionList = assertableConfig.getAssertionList();

        for (int i = 0; i < assertionList.size(); i++) {
            TestAssertionConfig config = assertionList.get(i);
            if (TestAssertionRegistry.getInstance().canBuildAssertion(config)) {
                assertions.get(i - mod).updateConfig(config);
            } else {
                mod++;
            }
View Full Code Here


        return result;
    }

    public WsdlMessageAssertion importAssertion(WsdlMessageAssertion source, boolean overwrite, boolean createCopy,
                                                String newName) {
        TestAssertionConfig conf = assertableConfig.addNewAssertion();
        conf.set(source.getConfig());
        conf.setName(newName);
        if (createCopy && conf.isSetId()) {
            conf.unsetId();
        }

        if (!source.isAllowMultiple()) {
            List<WsdlMessageAssertion> existing = getAssertionsOfType(source.getClass());
            if (!existing.isEmpty() && !overwrite) {
View Full Code Here

        fireAssertionAdded(result);
        return result;
    }

    public TestAssertion cloneAssertion(TestAssertion source, String name) {
        TestAssertionConfig conf = assertableConfig.addNewAssertion();
        conf.set(((WsdlMessageAssertion) source).getConfig());
        conf.setName(name);

        WsdlMessageAssertion result = addWsdlAssertion(conf);
        fireAssertionAdded(result);
        return result;
View Full Code Here

    }

    public WsdlMessageAssertion addWsdlAssertion(String assertionLabel) {
        try {
            TestAssertionConfig assertionConfig = assertableConfig.addNewAssertion();
            assertionConfig.setType(TestAssertionRegistry.getInstance().getAssertionTypeForName(assertionLabel));

            String name = assertionLabel;
            while (getAssertionByName(name.trim()) != null) {
                name = UISupport.prompt(
                        "Specify unique name of Assertion",
                        "Rename Assertion",
                        assertionLabel
                                + " "
                                + (getAssertionsOfType(TestAssertionRegistry.getInstance().getAssertionClassType(
                                assertionConfig)).size()));
                if (name == null) {
                    return null;
                }
            }
            WsdlMessageAssertion assertion = addWsdlAssertion(assertionConfig);
            if (assertion == null) {
                return null;
            }

            assertionConfig.setName(name);
            assertion.updateConfig(assertionConfig);

            if (assertion != null) {
                fireAssertionAdded(assertion);
            }
View Full Code Here

            public void removeAssertion(int ix) {
                getConfig().removeAssertion(ix);
            }

            public TestAssertionConfig insertAssertion(TestAssertionConfig source, int ix) {
                TestAssertionConfig conf = getConfig().insertNewAssertion(ix);
                conf.set(source);
                return conf;
            }

        });
    }
View Full Code Here

            public void removeAssertion(int ix) {
                getAMFRequestTestStepConfig().removeAssertion(ix);
            }

            public TestAssertionConfig insertAssertion(TestAssertionConfig source, int ix) {
                TestAssertionConfig conf = getAMFRequestTestStepConfig().insertNewAssertion(ix);
                conf.set(source);
                return conf;
            }
        });
    }
View Full Code Here

            public void removeAssertion(int ix) {
                getConfig().removeAssertion(ix);
            }

            public TestAssertionConfig insertAssertion(TestAssertionConfig source, int ix) {
                TestAssertionConfig conf = getConfig().insertNewAssertion(ix);
                conf.set(source);
                return conf;
            }
        });
    }
View Full Code Here

            public void removeAssertion(int ix) {
                getConfig().removeAssertion(ix);
            }

            public TestAssertionConfig insertAssertion(TestAssertionConfig source, int ix) {
                TestAssertionConfig conf = getConfig().insertNewAssertion(ix);
                conf.set(source);
                return conf;
            }
        });
    }
View Full Code Here

            public void removeAssertion(int ix) {
                getJdbcRequestTestStepConfig().removeAssertion(ix);
            }

            public TestAssertionConfig insertAssertion(TestAssertionConfig source, int ix) {
                TestAssertionConfig conf = getJdbcRequestTestStepConfig().insertNewAssertion(ix);
                conf.set(source);
                return conf;
            }
        });
    }
View Full Code Here

            testRequestConfig.setEndpoint(endpoints[0]);
        }
        testRequestConfig.addNewRequest().setStringValue(requestContent);

        if (values.getBoolean(ADD_SOAP_RESPONSE_ASSERTION)) {
            TestAssertionConfig assertionConfig = testRequestConfig.addNewAssertion();
            assertionConfig.setType(SoapResponseAssertion.ID);
        }

        if (values.getBoolean(ADD_SCHEMA_ASSERTION)) {
            TestAssertionConfig assertionConfig = testRequestConfig.addNewAssertion();
            assertionConfig.setType(SchemaComplianceAssertion.ID);
        }

        if (values.getBoolean(ADD_SOAP_FAULT_ASSERTION)) {
            TestAssertionConfig assertionConfig = testRequestConfig.addNewAssertion();
            assertionConfig.setType(NotSoapFaultAssertion.ID);
        }

        TestStepConfig testStep = TestStepConfig.Factory.newInstance();
        testStep.setType(REQUEST_TYPE);
        testStep.setConfig(requestStepConfig);
View Full Code Here

TOP

Related Classes of com.eviware.soapui.config.TestAssertionConfig

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.