/*
 * ARX: Efficient, Stable and Optimal Data Anonymization
 * Copyright (C) 2012 - 2013 Florian Kohlmayer, Fabian Prasser
 * 
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

package org.deidentifier.arx.test;

import java.io.IOException;

import org.deidentifier.arx.examples.Example1;
import org.deidentifier.arx.examples.Example2;
import org.deidentifier.arx.examples.Example3;
import org.deidentifier.arx.examples.Example4;
import org.deidentifier.arx.examples.Example5;
import org.deidentifier.arx.examples.Example6;
import org.deidentifier.arx.examples.Example7;
import org.deidentifier.arx.examples.Example8;
import org.junit.Assert;
import org.junit.Test;

public class TestExamples {

    @Test
    public void testExample1() {
        try {
            Example1.main(null);
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }

    @Test
    public void testExample2() throws IOException {
        try {
            Example2.main(null);
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }

    @Test
    public void testExample3() {
        try {
            Example3.main(null);
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }

    @Test
    public void testExample4() {
        try {
            Example4.main(null);
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }

    @Test
    public void testExample5() {
        try {
            Example5.main(null);
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }

    @Test
    public void testExample6() {
        try {
            Example6.main(null);
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }

    @Test
    public void testExample7() {
        try {
            Example7.main(null);
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }

    @Test
    public void testExample8() {
        try {
            Example8.main(null);
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }

}

@@ -883,16 +883,160 @@
 ample1;%0A
+import org.deidentifier.arx.examples.Example10;%0Aimport org.deidentifier.arx.examples.Example11;%0Aimport org.deidentifier.arx.examples.Example12;%0A
 import o
@@ -1356,16 +1356,63 @@
 ample8;%0A
+import org.deidentifier.arx.examples.Example9;%0A
 import o
@@ -3140,10 +3140,850 @@
 %0A    %7D%0A%0A
+    @Test%0A    public void testExample9() %7B%0A        try %7B%0A            Example9.main(null);%0A        %7D catch (final Exception e) %7B%0A            e.printStackTrace();%0A            Assert.fail();%0A        %7D%0A    %7D%0A    %0A%0A    @Test%0A    public void testExample10() %7B%0A        try %7B%0A            Example10.main(null);%0A        %7D catch (final Exception e) %7B%0A            e.printStackTrace();%0A            Assert.fail();%0A        %7D%0A    %7D%0A    %0A%0A    @Test%0A    public void testExample11() %7B%0A        try %7B%0A            Example11.main(null);%0A        %7D catch (final Exception e) %7B%0A            e.printStackTrace();%0A            Assert.fail();%0A        %7D%0A    %7D%0A    %0A%0A    @Test%0A    public void testExample12() %7B%0A        try %7B%0A            Example12.main(null);%0A        %7D catch (final Exception e) %7B%0A            e.printStackTrace();%0A            Assert.fail();%0A        %7D%0A    %7D%0A
 %7D%0A

Add test cases based on the examples