package innovimax.mixthem;

import innovimax.mixthem.arguments.Arguments;
import innovimax.mixthem.arguments.ArgumentException;

import org.junit.Assert;
import org.junit.Test;

/*
    Created by innovimax-jim
    Basic tests for this application
*/
public class BasicTest {
        @Test
    public final void testPrintUsage() {
        Arguments.printUsage();
        Assert.assertTrue(true);
    }
    
    @Test(expected=ArgumentException.class)
    public final void testEmptyArgs() throws ArgumentException {
        final String args[] = {};
        Arguments mixArgs = Arguments.checkArguments(args);
    }

    @Test(expected=ArgumentException.class)
    public final void testWrongArgs() throws ArgumentException {
        final String args[] = { "ghost1", "ghost2" };
        Arguments mixArgs = Arguments.checkArguments(args);
    }

    @Test
    public final void testNoRule() throws ArgumentException {
        final String args[] = { getClass().getResource("test001_file1.txt").getFile(), getClass().getResource("test001_file2.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
        Assert.assertTrue(true);
    }
    @Test
    public final void test1Rule() throws ArgumentException {
        final String args[] = { "-1", getClass().getResource("test001_file1.txt").getFile(), getClass().getResource("test001_file2.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
        Assert.assertTrue(true);
    }
    @Test(expected=ArgumentException.class)
    public final void testUnknownRule() throws ArgumentException {
        final String args[] = { "-x", getClass().getResource("test001_file1.txt").getFile(), getClass().getResource("test001_file2.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
    }

    @Test(expected=ArgumentException.class)
    public final void testUnexpectedParam() throws ArgumentException {
        final String args[] = { "-1", "#val", getClass().getResource("test001_file1.txt").getFile(), getClass().getResource("test001_file2.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
    }

    @Test(expected=ArgumentException.class)
    public final void testWrongSeedParam() throws ArgumentException {
        final String args[] = { "-random-alt-line", "#val", getClass().getResource("test001_file1.txt").getFile(), getClass().getResource("test001_file2.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
    }

    @Test
    public final void testValidSeedParam() throws ArgumentException {
        final String args[] = { "-random-alt-line", "#1789", getClass().getResource("test001_file1.txt").getFile(), getClass().getResource("test001_file2.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
        Assert.assertTrue(true);        
    }
    
    @Test(expected=ArgumentException.class)
    public final void testNotAParam() throws ArgumentException {
        final String args[] = { "-random-alt-line", "1789", getClass().getResource("test001_file1.txt").getFile(), getClass().getResource("test001_file2.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
    }

    @Test
    public final void testOptionalParam() throws ArgumentException {
        final String args[] = { "-random-alt-line", getClass().getResource("test001_file1.txt").getFile(), getClass().getResource("test001_file2.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
        Assert.assertTrue(true);        
    }
    
}

@@ -123,24 +123,91 @@
 ception;%0D%0A%0D%0A
+import java.io.IOException;%0D%0Aimport java.util.zip.ZipException;%0D%0A%0D%0A
 import org.j
@@ -220,16 +220,16 @@
 ssert;%0D%0A
-
 import o
@@ -584,32 +584,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -827,32 +827,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -1053,32 +1053,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -1400,32 +1400,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -1793,32 +1793,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -2158,32 +2158,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -2530,32 +2530,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -2882,32 +2882,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -3310,32 +3310,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina
@@ -3595,32 +3595,32 @@
 %7D%0D%0A%0D%0A    @Test%0D%0A
-
     public final
@@ -3661,32 +3661,59 @@
 rgumentException
+, IOException, ZIPException
  %7B%0D%0A        fina

Update BasicTest.java