예제 #1
0
  public void testSize() {
    for (int i = 0; i < 5; i++) {
      queue.enqueue(i);
    }

    int size = queue.size();

    testResults.add(new TestResult("testForEach", String.valueOf(5), String.valueOf(size)));
  }
예제 #2
0
  public void testForEach() {

    for (int i = 0; i < 5; i++) {
      queue.enqueue(i);
    }

    int size = queue.size();

    int count = 0;
    for (Object o : queue) {
      count++;
    }

    testResults.add(new TestResult("testForEach", String.valueOf(size), String.valueOf(count)));
  }
예제 #3
0
  public void testEnqueue() {
    queue.enqueue("test1");
    queue.enqueue("test2");

    testResults.add(new TestResult("testEnqueue", "2", String.valueOf(queue.size())));
  }