Credentials Test

This commit is contained in:
MRichter
2022-11-10 16:49:57 +01:00
parent 249ee6fe65
commit fd0f504a9c
+22
View File
@@ -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);
}
}