Package org.waveprotocol.wave.model.testing

Examples of org.waveprotocol.wave.model.testing.RandomProviderImpl


  private int iteration;

  public void testConsumeMethods() throws OperationException {
    IndexedDocumentImpl.performValidation = false;
    try {
      RandomProvider r = new RandomProviderImpl(1);
      for (RandomDocOpGenerator.Parameters params : PARAM_SETS) {
        for (iteration = 0; iteration < NUM_RUNS; iteration++) {
          System.out.println(iteration);
          consumeMethodsTestOneRun(r, params);
        }
View Full Code Here


  }

  /** For performance testing
   * @throws OperationException */
  public static void main(String[] argv) throws OperationException {
    RandomProvider random = new RandomProviderImpl(1);
    RandomDocOpGenerator.Parameters params = PARAM_SETS[0];
    DocumentSchema constraints = DocumentSchema.NO_SCHEMA_CONSTRAINTS;
    IndexedDocument<Node, Element, Text> doc =
      new IndexedDocumentImpl<Node, Element, Text, Void>(RawDocumentImpl.PROVIDER.parse("<a></a>"),
          new AnnotationTree<Object>("a", "b", null), constraints);
View Full Code Here

      // high-priority task. This task runs infrequently and is very minimal so
      // the risk of impacting the UI is low.
      SchedulerInstance.getHighPriorityTimer().scheduleRepeating(versionChecker,
          VERSION_CHECK_INTERVAL_MS, VERSION_CHECK_INTERVAL_MS);
    }
    final RandomProviderImpl random =
        // TODO(ohler): Get a stronger RandomProvider.
        RandomProviderImpl.ofSeed(randomSeed);
    final RandomBase64Generator random64 = new RandomBase64Generator(new RandomProvider() {
      @Override public int nextInt(int upperBound) {
        return random.nextInt(upperBound);
      }});
    final ParticipantId userId;
    try {
      userId = ParticipantId.of(userIdString);
    } catch (InvalidParticipantAddress e1) {
View Full Code Here

TOP

Related Classes of org.waveprotocol.wave.model.testing.RandomProviderImpl

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.