import de.dhbwstuttgart.core.ConsoleInterface;
import de.dhbwstuttgart.core.JavaTXCompiler;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import java.io.File;
import java.util.List;

public class TestPackages {

    private static final String bytecodeDirectory = System.getProperty("user.dir") + "/targetTest";

    @Test
    public void testPackages() throws Exception {
        var cmp = new JavaTXCompiler(
            List.of(
                new File("resources/packageTest/pkg/sub/Test1.jav"),
                new File("resources/packageTest/pkg/sub2/Test2.jav")
            ),
            List.of(new File("resources/packageTest")),
            new File(bytecodeDirectory), true
        );

        cmp.generateBytecode();
    }

    @Test
    public void testPackagesCircular() throws Exception {
        var cmp = new JavaTXCompiler(
            List.of(
                new File("resources/packageTest/pkg/sub/Cycle1.jav"),
                new File("resources/packageTest/pkg/sub2/Cycle2.jav")
            ),
            List.of(new File("resources/packageTest")),
            new File(bytecodeDirectory), true
        );

        cmp.generateBytecode();
    }

    @Test
    public void testPackageInterface() throws Exception {
        var cmp = new JavaTXCompiler(
            List.of(new File("resources/packageTest/pkg/sub/Interface.jav")),
            List.of(new File("resources/packageTest")),
            new File(bytecodeDirectory), true
        );

        cmp.generateBytecode();
    }
}
