ppp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

MainTest.java 435B

12345678910111213141516171819202122
  1. import org.junit.jupiter.api.Test;
  2. import java.io.ByteArrayInputStream;
  3. import static org.junit.jupiter.api.Assertions.*;
  4. class MainTest {
  5. @Test
  6. public void testFirstTryRight() {
  7. //Arrange
  8. byte[] bytes = "hofmannol\nGERONIMO\n".getBytes();
  9. ByteArrayInputStream in = new ByteArrayInputStream(bytes);
  10. //Act
  11. boolean logged_in = Main.login(in);
  12. assertTrue(logged_in);
  13. }
  14. }