Package de.metalcon.server.statusupdates

Examples of de.metalcon.server.statusupdates.StatusUpdate


            try {
              this.writeFiles(createStatusUpdateRequest
                  .getStatusUpdateTemplate(), formItemList);

              // create a new status update of the type specified
              final StatusUpdate statusUpdate = StatusUpdateManager
                  .instantiateStatusUpdate(
                      createStatusUpdateRequest
                          .getStatusUpdateTemplate()
                          .getName(), formItemList);
              statusUpdate.setId(createStatusUpdateRequest
                  .getStatusUpdateId());
              createStatusUpdateRequest
                  .setStatusUpdate(statusUpdate);

              // create status update
View Full Code Here


      fail();
    }

    long timestamp;
    int statusUpdateIdInt = 0;
    StatusUpdate statusUpdate;
    Node statusUpdateNode;
    for (StatusUpdateCreationItem creationItem : creates) {
      // set status update identifier
      statusUpdate = creationItem.getStatusUpdate();
      statusUpdate.setId(String.valueOf(statusUpdateIdInt));
      statusUpdateIdInt += 1;

      // create status update
      timestamp = System.currentTimeMillis();
      this.algorithm.createStatusUpdate(timestamp,
          creationItem.getUser(), statusUpdate);

      // check if status update node exists and contains correct data
      statusUpdateNode = NeoUtils
          .getStatusUpdateByIdentifier(statusUpdate.getId());

      assertEquals(
          statusUpdateNode
              .getProperty(Properties.StatusUpdate.IDENTIFIER),
          statusUpdate.getId());
      assertEquals(
          statusUpdateNode
              .getProperty(Properties.StatusUpdate.TIMESTAMP),
          timestamp);
      assertEquals(
          statusUpdateNode
              .getProperty(Properties.StatusUpdate.CONTENT_TYPE),
          statusUpdate.getType());
      assertEquals(
          statusUpdateNode
              .getProperty(Properties.StatusUpdate.CONTENT),
          statusUpdate.toJSONObject().toJSONString());

      // prevent the time stamps from being equal
      AlgorithmTest.waitMs(2);
    }
View Full Code Here

      fail();
    }

    long timestamp;
    int statusUpdateIdInt = 0;
    StatusUpdate statusUpdate;
    Node statusUpdateNode;
    for (StatusUpdateCreationItem creationItem : creates) {
      // set status update identifier
      statusUpdate = creationItem.getStatusUpdate();
      statusUpdate.setId(String.valueOf(statusUpdateIdInt));
      statusUpdateIdInt += 1;

      // create status update
      timestamp = System.currentTimeMillis();
      this.algorithm.createStatusUpdate(timestamp,
          creationItem.getUser(), statusUpdate);

      // check if status update node exists and contains correct data
      statusUpdateNode = NeoUtils
          .getStatusUpdateByIdentifier(statusUpdate.getId());

      assertEquals(
          statusUpdateNode
              .getProperty(Properties.StatusUpdate.IDENTIFIER),
          statusUpdate.getId());
      assertEquals(
          statusUpdateNode
              .getProperty(Properties.StatusUpdate.TIMESTAMP),
          timestamp);
      assertEquals(
          statusUpdateNode
              .getProperty(Properties.StatusUpdate.CONTENT_TYPE),
          statusUpdate.getType());
      assertEquals(
          statusUpdateNode
              .getProperty(Properties.StatusUpdate.CONTENT),
          statusUpdate.toJSONObject().toJSONString());

      // prevent the time stamps from being equal
      AlgorithmTest.waitMs(2);
    }
View Full Code Here

TOP

Related Classes of de.metalcon.server.statusupdates.StatusUpdate

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.