예제 #1
0
  @Before
  public void setUp() throws Exception {
    String args[] = new String[2];
    observer = new ConsoleView(args, new NullPrintStream(new NullOutputStream()));
    URL url = this.getClass().getResource("../resources/inner");
    File folder = new File(url.getFile());
    SharedFolder sharedDirectory = new SharedFolder(folder);
    sut = new HTTPServer(new Port(portNumber), sharedDirectory, observer);
    sut.start();

    for (int i = 0; i < NUMBEROFTHREADS; i++) {
      threads[i] = new ClientThread();
    }
  }
예제 #2
0
 @After
 public void tearDown() throws NotStartedException, InterruptedException, IOException {
   sut.stop();
 }