Examples of addNewConfig()


Examples of com.eviware.soapui.config.TestStepConfig.addNewConfig()

  public void testCreationCustomConfig() throws Exception {
    WsdlTestCase mockTestCase = Mockito.mock(WsdlTestCase.class);
    TestStepConfig config = TestStepConfig.Factory.newInstance();
    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
    xmlObject.set(XmlObject.Factory.parse("<xml-fragment xmlns:con=\"http://eviware.com/soapui/config\"><expression>5 + 5</expression><precision>4</precision><usePadding>true</usePadding></xml-fragment>"));
   
    ExpressionEvaluationTestStep step = new ExpressionEvaluationTestStep(mockTestCase, config, false);
    assertEquals("Math Evaluator", step.getName());
    assertEquals("5 + 5", step.getExpression());
View Full Code Here

Examples of com.eviware.soapui.config.TestStepConfig.addNewConfig()

  public void testCreationConfigError() throws Exception {
    WsdlTestCase mockTestCase = Mockito.mock(WsdlTestCase.class);
    TestStepConfig config = TestStepConfig.Factory.newInstance();
    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
    xmlObject.set(XmlObject.Factory.parse("<xml-fragment xmlns:con=\"http://eviware.com/soapui/config\"><expression>5 + 5</expression><precision>four</precision><usePadding>blah</usePadding></xml-fragment>"));
   
    ExpressionEvaluationTestStep step = new ExpressionEvaluationTestStep(mockTestCase, config, false);
    assertEquals("Math Evaluator", step.getName());
    assertEquals("5 + 5", step.getExpression());
View Full Code Here

Examples of com.eviware.soapui.config.TestStepConfig.addNewConfig()

    TestCaseRunContext mockRunContext = Mockito.mock(TestCaseRunContext.class);
    Mockito.when(mockRunContext.expand("5 + 5")).thenReturn("5 + 5");
    TestStepConfig config = TestStepConfig.Factory.newInstance();
    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
   
    ExpressionEvaluationTestStep step = new ExpressionEvaluationTestStep(mockTestCase, config, false);
    step.setExpression("5 + 5");
   
    TestStepResult stepResult = step.run(null, mockRunContext);
View Full Code Here

Examples of com.eviware.soapui.config.TestStepConfig.addNewConfig()

    TestCaseRunContext mockRunContext = Mockito.mock(TestCaseRunContext.class);
    Mockito.when(mockRunContext.expand("10 / 3")).thenReturn("10 / 3");
    TestStepConfig config = TestStepConfig.Factory.newInstance();
    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
   
    ExpressionEvaluationTestStep step = new ExpressionEvaluationTestStep(mockTestCase, config, false);
    step.setExpression("10 / 3");
    step.setPrecision(2);
   
View Full Code Here

Examples of com.eviware.soapui.config.TestStepConfig.addNewConfig()

    TestCaseRunContext mockRunContext = Mockito.mock(TestCaseRunContext.class);
    Mockito.when(mockRunContext.expand("10 / 4")).thenReturn("10 / 4");
    TestStepConfig config = TestStepConfig.Factory.newInstance();
    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
   
    ExpressionEvaluationTestStep step = new ExpressionEvaluationTestStep(mockTestCase, config, false);
    step.setExpression("10 / 4");
    step.setPrecision(2);
   
View Full Code Here

Examples of com.eviware.soapui.config.TestStepConfig.addNewConfig()

    TestCaseRunContext mockRunContext = Mockito.mock(TestCaseRunContext.class);
    Mockito.when(mockRunContext.expand("10 / 4")).thenReturn("10 / 4");
    TestStepConfig config = TestStepConfig.Factory.newInstance();
    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
   
    ExpressionEvaluationTestStep step = new ExpressionEvaluationTestStep(mockTestCase, config, false);
    step.setExpression("10 / 4");
    step.setPrecision(2);
    step.setUsePadding(true);
View Full Code Here

Examples of com.eviware.soapui.config.TestStepConfig.addNewConfig()

    TestCaseRunContext mockRunContext = Mockito.mock(TestCaseRunContext.class);
    Mockito.when(mockRunContext.expand("10 / now_when_the_saints")).thenReturn("10 / now_when_the_saints");
    TestStepConfig config = TestStepConfig.Factory.newInstance();
    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
   
    ExpressionEvaluationTestStep step = new ExpressionEvaluationTestStep(mockTestCase, config, false);
    step.setExpression("10 / now_when_the_saints");
    step.setPrecision(2);
    step.setUsePadding(true);
View Full Code Here

Examples of com.eviware.soapui.config.TestStepConfig.addNewConfig()

    WsdlTestSuite mockTestSuite = Mockito.mock(WsdlTestSuite.class);
    WsdlTestCase testCase = new WsdlTestCase(mockTestSuite, TestCaseConfig.Factory.newInstance(), false);
    TestStepConfig config = TestStepConfig.Factory.newInstance();
    config.setName("Math Evaluator");
    config.setType("expreval");
    XmlObject xmlObject = config.addNewConfig();
    xmlObject.set(XmlObject.Factory.parse("<xml-fragment xmlns:con=\"http://eviware.com/soapui/config\"><expression>5 + 5</expression><precision>4</precision><usePadding>true</usePadding></xml-fragment>"));
   
    WsdlTestStep constructedTestStep = factory.buildTestStep(testCase, config, false);
    assertTrue("Test step must be of type ExpressionEvaluationTestStep", constructedTestStep instanceof ExpressionEvaluationTestStep);
   
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.