* You are expected to implement the {@link Application#run(CommandLine)} method
*
* @author jcechace
*/
public class Application {
@Parameter(names = "--help", help = true)
private boolean showUsage = false;
/**
* Application entry point
*
* @param args command line arguments of the application
*/
public static void main(String[] args) {
Application app = new Application();
CommandLine cli = new CommandLine(app);
cli.parseArguments(args);
if (app.showUsage) {
cli.showUsage();
} else {
app.run(cli);
}
}
/**
* Application runtime logic
*
* @param cli command line interface
*/
private void run(CommandLine cli) {
throw new UnsupportedOperationException("Remove this line and implement the method");
}
}
2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/ 0000775 0000000 0000000 00000000000 14045546230 0022353 5 ustar 00root root 0000000 0000000 2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/java/ 0000775 0000000 0000000 00000000000 14045546230 0023274 5 ustar 00root root 0000000 0000000 2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/java/cz/ 0000775 0000000 0000000 00000000000 14045546230 0023710 5 ustar 00root root 0000000 0000000 2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/java/cz/muni/ 0000775 0000000 0000000 00000000000 14045546230 0024660 5 ustar 00root root 0000000 0000000 2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/java/cz/muni/fi/ 0000775 0000000 0000000 00000000000 14045546230 0025256 5 ustar 00root root 0000000 0000000 2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/java/cz/muni/fi/pb162/ 0000775 0000000 0000000 00000000000 14045546230 0026110 5 ustar 00root root 0000000 0000000 2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/java/cz/muni/fi/pb162/hw02/ 0000775 0000000 0000000 00000000000 14045546230 0026670 5 ustar 00root root 0000000 0000000 2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/java/cz/muni/fi/pb162/hw02/.gitkeep0000664 0000000 0000000 00000000000 14045546230 0030307 0 ustar 00root root 0000000 0000000 FileLoaderTest.java 0000664 0000000 0000000 00000001726 14045546230 0032330 0 ustar 00root root 0000000 0000000 2021-hw02-text-e505c8c695c217c520739ccc9393c85f74e0b9ea/src/test/java/cz/muni/fi/pb162/hw02 package cz.muni.fi.pb162.hw02;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import java.net.URISyntaxException;
import java.util.List;
import static cz.muni.fi.pb162.hw02.TestUtils.resourcePath;
import static org.assertj.core.api.Assertions.assertThat;
class FileLoaderTest {
private FileLoader fileLoader;
@BeforeEach
void setup() {
fileLoader = new FileLoader();
}
@Test
void shouldReadSingleLineFileAsLines() throws URISyntaxException, IOException {
List