Examples of TestMessage


Examples of org.eclipse.rap.rwt.testfixture.TestMessage

    CREATE, SET, CALL, LISTEN
  }

  public static boolean hasCreateOperation( String type ) {
    boolean found = false;
    TestMessage protocolMessage = Fixture.getProtocolMessage();
    int operationCount = protocolMessage.getOperationCount();
    for( int i = 0; i < operationCount; i++ ) {
      Operation operation = protocolMessage.getOperation( i );
      if( operation instanceof CreateOperation ) {
        CreateOperation create = ( CreateOperation )operation;
        if( create.getType().equals( type ) ) {
          found = true;
        }
View Full Code Here

Examples of org.eclipse.rap.rwt.testfixture.TestMessage

    return found;
  }

  public static boolean isParentOfCreate( String type, String parentId ) {
    boolean found = false;
    TestMessage protocolMessage = Fixture.getProtocolMessage();
    int operationCount = protocolMessage.getOperationCount();
    for( int i = 0; i < operationCount; i++ ) {
      Operation operation = protocolMessage.getOperation( i );
      if( operation instanceof CreateOperation ) {
        CreateOperation create = ( CreateOperation )operation;
        if( create.getType().equals( type ) && create.getProperties().get( "parent" ).asString().equals( parentId ) ) {
          found = true;
        }
View Full Code Here

Examples of org.eclipse.rap.rwt.testfixture.TestMessage

  public static JsonObject getHead() {
    return Fixture.getProtocolMessage().getHead();
  }

  public static boolean hasOperation( String target, OperationType type, String operationName ) {
    TestMessage message = Fixture.getProtocolMessage();
    if( type == OperationType.CREATE ) {
      CreateOperation operation = message.findCreateOperation( target );
      if( operation != null ) {
        return true;
      }
    } else if( type == OperationType.CALL ) {
      CallOperation operation = message.findCallOperation( target, operationName );
      if( operation != null ) {
        return true;
      }
    } else if( type == OperationType.SET ) {
      SetOperation operation = findSetOperation( message, target );
View Full Code Here

Examples of org.eclipse.rap.rwt.testfixture.TestMessage

    }
    return false;
  }

  public static JsonObject getOperationProperties( String target, OperationType type, String operationName ) {
    TestMessage message = Fixture.getProtocolMessage();
    if( type == OperationType.CREATE ) {
      CreateOperation operation = message.findCreateOperation( target );
      if( operation != null ) {
        return operation.getProperties();
      }
    } else if( type == OperationType.CALL ) {
      CallOperation operation = message.findCallOperation( target, operationName );
      if( operation != null ) {
        return operation.getParameters();
      }
    } else if( type == OperationType.SET ) {
      SetOperation operation = findSetOperation( message, target );
View Full Code Here

Examples of org.hive2hive.core.network.messages.TestMessage

    FutureGet futureGet = nodeA.getDataManager().getUnblocked(parameters);
    futureGet.awaitUninterruptibly();
    assertNull(futureGet.getData());

    // create a message with target node B
    final TestMessage message = new TestMessage(nodeB.getNodeId(), contentKey, new H2HTestData(data));

    // initialize the process and the one and only step to test
    BaseMessageProcessStep step = new BaseMessageProcessStep(nodeA.getMessageManager()) {

      @Override
View Full Code Here

Examples of org.hive2hive.core.network.messages.TestMessage

    // assign a denying message handler at target node
    nodeB.getConnection().getPeer().setObjectDataReply(new DenyingMessageReplyHandler());

    // create a message with target node B
    final TestMessage message = new TestMessage(nodeB.getNodeId(), contentKey, new H2HTestData(data));

    // initialize the process and the one and only step to test
    BaseMessageProcessStep step = new BaseMessageProcessStep(nodeA.getMessageManager()) {

      @Override
View Full Code Here

Examples of org.testng.remote.strprotocol.TestMessage

      m_currentSuite = new SuiteMessage(attributes.getValue(ATTR_NAME),
          true /* start */, m_suiteMethodCount);
      m_suiteListener.onStart(m_currentSuite);
    } else if (TAG_TEST.equals(qName)) {
      m_passed = m_failed = m_skipped = 0;
      m_currentTest = new TestMessage(true /* start */, m_currentSuite.getSuiteName(),
          attributes.getValue(ATTR_NAME), m_testMethodCount,
          m_passed, m_failed, m_skipped, 0);
      m_testListener.onStart(m_currentTest);
    } else if (TAG_CLASS.equals(qName)) {
      m_className = attributes.getValue(ATTR_NAME);
View Full Code Here

Examples of org.testng.remote.strprotocol.TestMessage

  public void endElement (String uri, String localName, String qName) {
    if (TAG_SUITE.equals(qName)) {
      m_suiteListener.onFinish(new SuiteMessage(null, false /* end */, m_suiteMethodCount));
      m_currentSuite = null;
    } else if (TAG_TEST.equals(qName)) {
      m_currentTest = new TestMessage(false /* start */, m_currentSuite.getSuiteName(),
          null, m_testMethodCount,
          m_passed, m_failed, m_skipped, 0);
      m_testMethodCount = 0;
      m_testListener.onFinish(m_currentTest);
    } else if (TAG_CLASS.equals(qName)) {
View Full Code Here

Examples of org.testng.remote.strprotocol.TestMessage

      m_currentSuite = new SuiteMessage(attributes.getValue(ATTR_NAME),
          true /* start */, m_suiteMethodCount);
      m_suiteListener.onStart(m_currentSuite);
    } else if (TAG_TEST.equals(qName)) {
      m_passed = m_failed = m_skipped = 0;
      m_currentTest = new TestMessage(true /* start */, m_currentSuite.getSuiteName(),
          attributes.getValue(ATTR_NAME), m_testMethodCount,
          m_passed, m_failed, m_skipped, 0);
      m_testListener.onStart(m_currentTest);
    } else if (TAG_CLASS.equals(qName)) {
      m_className = attributes.getValue(ATTR_NAME);
View Full Code Here

Examples of org.testng.remote.strprotocol.TestMessage

  public void endElement (String uri, String localName, String qName) {
    if (TAG_SUITE.equals(qName)) {
      m_suiteListener.onFinish(new SuiteMessage(null, false /* end */, m_suiteMethodCount));
      m_currentSuite = null;
    } else if (TAG_TEST.equals(qName)) {
      m_currentTest = new TestMessage(false /* start */, m_currentSuite.getSuiteName(),
          null, m_testMethodCount,
          m_passed, m_failed, m_skipped, 0);
      m_testMethodCount = 0;
      m_testListener.onFinish(m_currentTest);
    } else if (TAG_CLASS.equals(qName)) {
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.