Test 3
This commit is contained in:
parent
6a02be9f2e
commit
249ee6fe65
22
test/MainTest.java
Normal file
22
test/MainTest.java
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user