diff options
Diffstat (limited to 'jetty-server/src/test/java/org/eclipse/jetty/server/ServerTest.java')
-rw-r--r-- | jetty-server/src/test/java/org/eclipse/jetty/server/ServerTest.java | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/jetty-server/src/test/java/org/eclipse/jetty/server/ServerTest.java b/jetty-server/src/test/java/org/eclipse/jetty/server/ServerTest.java index ee71c54c53..497535d752 100644 --- a/jetty-server/src/test/java/org/eclipse/jetty/server/ServerTest.java +++ b/jetty-server/src/test/java/org/eclipse/jetty/server/ServerTest.java @@ -4,30 +4,33 @@ // All rights reserved. This program and the accompanying materials // are made available under the terms of the Eclipse Public License v1.0 // and Apache License v2.0 which accompanies this distribution. -// The Eclipse Public License is available at +// The Eclipse Public License is available at // http://www.eclipse.org/legal/epl-v10.html // The Apache License v2.0 is available at // http://www.opensource.org/licenses/apache2.0.php -// You may elect to redistribute this code under either of these licenses. +// You may elect to redistribute this code under either of these licenses. // ======================================================================== package org.eclipse.jetty.server; import java.util.Random; -import junit.framework.TestCase; - import org.eclipse.jetty.server.handler.DefaultHandler; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.fail; /** * @version $Revision$ */ -public class ServerTest extends TestCase +public class ServerTest { /** * JETTY-87, adding a handler to a server without any handlers should not * throw an exception */ + @Test public void testAddHandlerToEmptyServer() { Server server=new Server(); @@ -42,6 +45,7 @@ public class ServerTest extends TestCase } } + @Test public void testServerWithPort() { int port=new Random().nextInt(20000)+10000; |