summaryrefslogtreecommitdiffstats
path: root/simple/simple-http/src/test/java/org/simpleframework/http/StatusTest.java
blob: 6bb8ef5fdc0fa384aba780bb6fa52fa66e3bca15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
package org.simpleframework.http;

import junit.framework.TestCase;

public class StatusTest extends TestCase {
   
   private static final int ITERATIONS = 100000;
   
   public void testStatus() {
      testStatus(200, "OK");
      testStatus(404, "Not Found");
   }
   
   public void testStatus(int code, String expect) {
      for(int i = 0; i < ITERATIONS; i++) {
         assertEquals(expect, Status.getDescription(code));
      }
   }

}