<commit_before>import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;

import org.junit.Test;

import sk.tomsik68.mclauncher.api.common.ILaunchSettings;
import sk.tomsik68.mclauncher.api.common.IObservable;
import sk.tomsik68.mclauncher.api.common.IObserver;
import sk.tomsik68.mclauncher.api.common.MCLauncherAPI;
import sk.tomsik68.mclauncher.api.common.mc.MinecraftInstance;
import sk.tomsik68.mclauncher.api.login.IProfile;
import sk.tomsik68.mclauncher.api.login.ISession;
import sk.tomsik68.mclauncher.api.versions.IVersion;
import sk.tomsik68.mclauncher.impl.common.Platform;
import sk.tomsik68.mclauncher.impl.login.yggdrasil.YDLoginService;
import sk.tomsik68.mclauncher.impl.login.yggdrasil.YDProfileIO;
import sk.tomsik68.mclauncher.impl.versions.mcdownload.MCDownloadVersionList;

public class TestMCDownloadForgeLaunch {

    @Test
    public void test() {
        MCLauncherAPI.log.setLevel(Level.ALL);
        try {
            // finally use my minecraft credentials
            System.out.println("Logging in...");
            YDLoginService service = new YDLoginService();
            service.load(Platform.getCurrentPlatform().getWorkingDirectory());
            YDProfileIO profileIO = new YDProfileIO(Platform
                    .getCurrentPlatform().getWorkingDirectory());
            IProfile[] profiles = profileIO.read();

            final ISession session = service.login(profiles[0]);
            profileIO.write(profiles);
            System.out.println("Success! Launching...");
            final MinecraftInstance mc = new MinecraftInstance(
                    new File("testmc"));
            /*final BasicModdingProfile mods = new BasicModdingProfile();
            mods.addCoreMod(new File(mc.getLocation(), "coremods/forge-1.8-11.14.0.1299-universal.jar"));*/
            final MCDownloadVersionList versionList = new MCDownloadVersionList();
            IVersion toLaunch = versionList.retrieveVersionInfo("1.8-Forge11.14.3.1450");
            System.out.println(toLaunch);
            try {
                toLaunch.getInstaller().install(toLaunch, mc, null);
                List<String> launchCommand = toLaunch.getLauncher()
                        .getLaunchCommand(session, mc, null,
                                toLaunch, new ILaunchSettings() {

                                    @Override
                                    public boolean isModifyAppletOptions() {
                                        return false;
                                    }

                                    @Override<commit_msg>Cleaned up test forge launch file<commit_after>import java.io.BufferedReader;
import java.io.File;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;

import org.junit.Test;

import sk.tomsik68.mclauncher.api.common.ILaunchSettings;
import sk.tomsik68.mclauncher.api.common.MCLauncherAPI;
import sk.tomsik68.mclauncher.api.common.mc.MinecraftInstance;
import sk.tomsik68.mclauncher.api.login.ISession;
import sk.tomsik68.mclauncher.api.versions.IVersion;
import sk.tomsik68.mclauncher.backend.GlobalAuthenticationSystem;
import sk.tomsik68.mclauncher.impl.common.Platform;
import sk.tomsik68.mclauncher.impl.versions.mcdownload.MCDownloadVersionList;

public class TestMCDownloadForgeLaunch {

    @Test
    public void test() {
        MCLauncherAPI.log.setLevel(Level.ALL);
        try {
            // finally use my minecraft credentials
            System.out.println("Logging in...");


            final ISession session = GlobalAuthenticationSystem.login(null);
            System.out.println("Success! Launching...");
            final MinecraftInstance mc = new MinecraftInstance(
                    Platform.getCurrentPlatform().getWorkingDirectory());
            final MCDownloadVersionList versionList = new MCDownloadVersionList();
            IVersion toLaunch = versionList.retrieveVersionInfo("1.8-Forge11.14.3.1450");
            System.out.println(toLaunch);
            try {
                toLaunch.getInstaller().install(toLaunch, mc, null);
                List<String> launchCommand = toLaunch.getLauncher()
                        .getLaunchCommand(session, mc, null,
                                toLaunch, new ILaunchSettings() {

                                    @Override
                                    public boolean isModifyAppletOptions() {
                                        return false;
                                    }

                                    @Override
{'fraction_non_alphanumeric': 0.09573338993844195, 'fraction_numerical': 0.01570791763956697, 'mean_word_length': 2.302032235459005, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 3, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 20, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6950824', 'n_tokens_mistral': 1415, 'n_tokens_neox': 1334, 'n_words': 213}