diff --git a/test/MainTest.java b/test/MainTest.java new file mode 100644 index 0000000..8d96ecc --- /dev/null +++ b/test/MainTest.java @@ -0,0 +1,22 @@ +import org.junit.jupiter.api.Test; + +import java.io.ByteArrayInputStream; + +import static org.junit.jupiter.api.Assertions.*; + +class MainTest { + + @Test + public void testFirstTryRight() { + + //Arrange + byte[] bytes = "hofmannol\nGeronimo\n".getBytes(); + ByteArrayInputStream in = new ByteArrayInputStream(bytes); + + //Act + boolean logged_in = Main.login(in); + + assertTrue(logged_in); + } + +} \ No newline at end of file