aboutsummaryrefslogtreecommitdiffstats
path: root/test/core/CommandLineArgumentContainerTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/CommandLineArgumentContainerTest.java')
-rw-r--r--test/core/CommandLineArgumentContainerTest.java26
1 files changed, 26 insertions, 0 deletions
diff --git a/test/core/CommandLineArgumentContainerTest.java b/test/core/CommandLineArgumentContainerTest.java
new file mode 100644
index 0000000..f6a6ead
--- /dev/null
+++ b/test/core/CommandLineArgumentContainerTest.java
@@ -0,0 +1,26 @@
+package com.jantuomi.interpreter.test.core;
+
+import com.jantuomi.interpreter.main.core.CommandLineArgumentContainer;
+import com.jantuomi.interpreter.main.utils.Utilities;
+import org.junit.Test;
+
+import java.io.File;
+
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Created by jan on 10.6.2016.
+ */
+public class CommandLineArgumentContainerTest {
+ @Test
+ public void getSourceFileContents() throws Exception {
+ CommandLineArgumentContainer c = CommandLineArgumentContainer.getInstance();
+
+ File basePath = new File(Utilities.getBasePath());
+ c.setFile(new File(basePath, "src/com/jantuomi/interpreter/test/resources/test.file"));
+ String contents = c.getSourceFileContents();
+ System.out.println(contents);
+ assertTrue(contents.contains("###"));
+ }
+
+} \ No newline at end of file