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_file1.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_file1.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_file1.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_file1.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_file1.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_file1.txt").getFile() };
        Arguments mixArgs = Arguments.checkArguments(args);
        Assert.assertTrue(true);        
    }

    @Test(expected=ArgumentException.class)
    public final void testMain() throws ArgumentException {
        final String args[] = {};
        MixThem.main(args);
    }

}

@@ -2928,186 +2928,7 @@
 %0D%0A%0D%0A
-    @Test(expected=ArgumentException.class)%0D%0A    public final void testMain() throws ArgumentException %7B%0D%0A        final String args%5B%5D = %7B%7D;%0D%0A        MixThem.main(args);%0D%0A    %7D%0D%0A%0D%0A
 %7D%0D%0A

remove method