aboutsummaryrefslogtreecommitdiffstats
path: root/test/MainTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/MainTest.java')
-rw-r--r--test/MainTest.java24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/MainTest.java b/test/MainTest.java
new file mode 100644
index 0000000..fec91a7
--- /dev/null
+++ b/test/MainTest.java
@@ -0,0 +1,24 @@
+package com.jantuomi.interpreter.test;
+
+import com.jantuomi.interpreter.main.Main;
+import org.junit.Test;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Created by jan on 10.6.2016.
+ */
+public class MainTest {
+ @Test
+ public void testParseArguments1() {
+ String[] notAnArgument = {"--not-an-argument"};
+ assertFalse(Main.parseArguments(notAnArgument));
+ }
+
+ @Test
+ public void testParseArguments2() {
+ String[] fileTestArgument = {"-f", "test.file"};
+ assertTrue(Main.parseArguments(fileTestArgument));
+ }
+} \ No newline at end of file