Skip to content

Commit

Permalink
Unit test for HttpServer
Browse files Browse the repository at this point in the history
  • Loading branch information
rakshyab02 committed Aug 1, 2024
1 parent 247f685 commit 4bc71c3
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/test/java/uta/cse3310/HttpServerTest.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package uta.cse3310;

package uta.cse3310;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;

class HttpServerTest {

@Test
void testHttpServerCreation() {
HttpServer server = new HttpServer(8080, "src/main/resources");
assertNotNull(server);
}
}
@Test
void testHttpServerCreation() {
int port = 8080;
String htmlDir = "src/main/resources";
HttpServer server = new HttpServer(port, htmlDir);


assertNotNull(server, "Server should not be null");
}
}

0 comments on commit 4bc71c3

Please sign in to comment.