Package com.eviware.soapui.model.testsuite

Examples of com.eviware.soapui.model.testsuite.TestAssertion


  {
    StringBuffer buf = new StringBuffer();

    for( int c = 0; c < assertions.size(); c++ )
    {
      TestAssertion assertion = assertions.get( c );
      Assertable assertable = assertion.getAssertable();
      if( assertable instanceof WsdlTestStep )
        failedTests.remove( ( ( WsdlTestStep )assertable ).getTestCase() );

      buf.append( assertion.getName() + " in [" + assertable.getModelItem().getName() + "] failed;\n" );
      buf.append( Arrays.toString( assertion.getErrors() ) + "\n" );

      WsdlTestStepResult result = assertionResults.get( assertion );
      StringWriter stringWriter = new StringWriter();
      PrintWriter writer = new PrintWriter( stringWriter );
      result.writeTo( writer );
View Full Code Here


    if( currentStep instanceof Assertable )
    {
      Assertable requestStep = ( Assertable )currentStep;
      for( int c = 0; c < requestStep.getAssertionCount(); c++ )
      {
        TestAssertion assertion = requestStep.getAssertionAt( c );
        log.info( "Assertion [" + assertion.getName() + "] has status " + assertion.getStatus() );
        if( assertion.getStatus() == AssertionStatus.FAILED )
        {
          for( AssertionError error : assertion.getErrors() )
            log.error( "ASSERTION FAILED -> " + error.getMessage() );

          assertions.add( assertion );
          assertionResults.put( assertion, ( WsdlTestStepResult )result );
        }
View Full Code Here

      name = UISupport.prompt( "Specify unique name for cloned assertion", "Clone Assertion", target.getName() );
      if( name == null )
        return;
    }

    TestAssertion assertion = target.getAssertable().cloneAssertion( target, name );

    if( assertion.isConfigurable() )
      assertion.configure();
  }
View Full Code Here

    {
      UISupport.showErrorMessage( "This assertion can only be added once" );
      return;
    }

    TestAssertion assertion = assertable.addAssertion( selection );
    if( assertion == null )
    {
      UISupport.showErrorMessage( "Failed to add assertion" );
      return;
    }

    if( assertion.isConfigurable() )
    {
      assertion.configure();
    }
  }
View Full Code Here

    public Component getListCellRendererComponent( JList list, Object value, int index, boolean isSelected,
        boolean cellHasFocus )
    {
      setEnabled( list.isEnabled() );

      TestAssertion assertion = ( TestAssertion )value;
      setText( assertion.getLabel() );

      if( assertion.isDisabled() && isEnabled() )
        setEnabled( false );

      if( isSelected )
      {
        setBackground( list.getSelectionBackground() );
View Full Code Here

          testStepResult.addMessage( "Invalid/empty response" );
        }
        else
          for( int c = 0; c < getAssertionCount(); c++ )
          {
            TestAssertion assertion = getAssertionAt( c );
            AssertionError[] errors = assertion.getErrors();
            if( errors != null )
            {
              for( AssertionError error : errors )
              {
                testStepResult.addMessage( "[" + assertion.getName() + "] " + error.getMessage() );
              }
            }
          }

        break;
View Full Code Here

  }

  public TestAssertion moveAssertion( int ix, int offset )
  {
    PropertyChangeNotifier notifier = new PropertyChangeNotifier();
    TestAssertion assertion = getAssertionAt( ix );
    try
    {
      return assertionsSupport.moveAssertion( ix, offset );
    }
    finally
View Full Code Here

  public boolean canAddMultipleAssertions( String name, Assertable assertable )
  {
    for( int c = 0; c < assertable.getAssertionCount(); c++ )
    {
      TestAssertion assertion = assertable.getAssertionAt( c );
      if( assertion.isAllowMultiple() )
        continue;

      if( assertion.getClass().equals( availableAssertions.get( getAssertionTypeForName( name ) ) ) )
      {
        return false;
      }
    }
View Full Code Here

          testStepResult.addMessage( "Invalid/empty response" );
        }
        else
          for( int c = 0; c < getAssertionCount(); c++ )
          {
            TestAssertion assertion = getAssertionAt( c );
            AssertionError[] errors = assertion.getErrors();
            if( errors != null )
            {
              for( AssertionError error : errors )
              {
                testStepResult.addMessage( "[" + assertion.getName() + "] " + error.getMessage() );
              }
            }
          }

        break;
View Full Code Here

  }

  public TestAssertion moveAssertion( int ix, int offset )
  {
    PropertyChangeNotifier notifier = new PropertyChangeNotifier();
    TestAssertion assertion = getAssertionAt( ix );
    try
    {
      return assertionsSupport.moveAssertion( ix, offset );
    }
    finally
View Full Code Here

TOP

Related Classes of com.eviware.soapui.model.testsuite.TestAssertion

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.