@@ -0,0 +1,1400 @@
+package fi.helsinki.cs.tmc.cli.command;%0A%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport fi.helsinki.cs.tmc.cli.Application;%0A%0Aimport org.junit.Before;%0Aimport org.junit.BeforeClass;%0Aimport org.junit.Test;%0A%0Aimport java.io.ByteArrayOutputStream;%0Aimport java.io.OutputStream;%0Aimport java.io.PrintStream;%0A%0Apublic class LoginCommandTest %7B%0A%0A    private static String serverAddress;%0A    private static String username;%0A    private static String password;%0A%0A    private Application app;%0A    private OutputStream os;%0A%0A    public LoginCommandTest() %7B%0A    %7D%0A%0A    @BeforeClass%0A    public static void setUpClass() %7B%0A        LoginCommandTest.serverAddress = System.getenv(%22TMC_SERVER_ADDRESS%22);%0A        LoginCommandTest.username = System.getenv(%22TMC_USERNAME%22);%0A        LoginCommandTest.password = System.getenv(%22TMC_PASSWORD%22);%0A    %7D%0A%0A    @Before%0A    public void setUp() %7B%0A        this.app = new Application();%0A        this.os = new ByteArrayOutputStream();%0A%0A        PrintStream ps = new PrintStream(os);%0A        System.setOut(ps);%0A    %7D%0A%0A    @Test%0A    public void logsInWithCorrectServerUserAndPassword() %7B%0A        String%5B%5D args = %7B%22login%22,%0A            %22-s%22, LoginCommandTest.serverAddress,%0A            %22-u%22, LoginCommandTest.username,%0A            %22-p%22, LoginCommandTest.password%7D;%0A%0A        app.run(args);%0A        String output = os.toString();%0A        assertTrue(output.contains(%22Login successful!%22));%0A    %7D%0A%7D%0A

Add Login tests