<commit_before>package org.jboss.windup.test;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.forge.addon.ui.controller.WizardCommandController;
import org.jboss.forge.addon.ui.test.UITestHarness;
import org.jboss.forge.arquillian.AddonDependency;
import org.jboss.forge.arquillian.Dependencies;
import org.jboss.forge.arquillian.archive.ForgeArchive;
import org.jboss.forge.furnace.repositories.AddonDependencyEntry;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.windup.WindupService;
import org.jboss.windup.impl.ui.WindupWizard;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

import com.google.inject.Inject;

@RunWith(Arquillian.class)
public class WindupWizardTest
{
    @Deployment
    @Dependencies({
             @AddonDependency(name = "org.jboss.windup.legacy.application:legacy-windup"),
             @AddonDependency(name = "org.jboss.forge.addon:ui-test-harness"),
    })
    public static ForgeArchive getDeployment()
    {
       ForgeArchive archive = ShrinkWrap
                .create(ForgeArchive.class)
                .addBeansXML()
                .addAsAddonDependencies(
                        AddonDependencyEntry.create("org.jboss.forge.furnace.container:cdi"),
                        AddonDependencyEntry.create("org.jboss.forge.addon:ui-test-harness"),
                        AddonDependencyEntry.create("org.jboss.windup.legacy.application:legacy-windup")
                );

       return archive;
    }
    
    @Inject
    private UITestHarness uiTestHarness;
    
    @Inject
    private WindupService windupService;
    
    @Test
    public void testNewMigration() throws Exception {
        Assert.assertNotNull(windupService);
        Assert.assertNotNull(uiTestHarness);
        try (WizardCommandController controller = uiTestHarness.createWizardController(WindupWizard.class)) {
            controller.initialize();
            Assert.assertTrue(controller.isEnabled());
            controller.setValueFor("input", "testinput");
            Assert.assertFalse(controller.canExecute());
            controller.setValueFor("output", "testoutput");
            Assert.assertFalse(controller.canExecute());
            controller.setValueFor("packages", "org.jboss");
            Assert.assertTrue(controller.canExecute());
        }
    }
}<commit_msg>Import correct @Inject<commit_after>package org.jboss.windup.test;

import javax.inject.Inject;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.forge.addon.ui.controller.WizardCommandController;
import org.jboss.forge.addon.ui.test.UITestHarness;
import org.jboss.forge.arquillian.AddonDependency;
import org.jboss.forge.arquillian.Dependencies;
import org.jboss.forge.arquillian.archive.ForgeArchive;
import org.jboss.forge.furnace.repositories.AddonDependencyEntry;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.windup.WindupService;
import org.jboss.windup.impl.ui.WindupWizard;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;

@RunWith(Arquillian.class)
public class WindupWizardTest
{
    @Deployment
    @Dependencies({
                @AddonDependency(name = "org.jboss.windup.legacy.application:legacy-windup"),
                @AddonDependency(name = "org.jboss.forge.addon:ui-test-harness"),
    })
    public static ForgeArchive getDeployment()
    {
        ForgeArchive archive = ShrinkWrap
                    .create(ForgeArchive.class)
                    .addBeansXML()
                    .addAsAddonDependencies(
                                AddonDependencyEntry.create("org.jboss.forge.furnace.container:cdi"),
                                AddonDependencyEntry.create("org.jboss.forge.addon:ui-test-harness"),
                                AddonDependencyEntry.create("org.jboss.windup.legacy.application:legacy-windup")
                    );

        return archive;
    }

    @Inject
    private UITestHarness uiTestHarness;

    @Inject
    private WindupService windupService;

    @Test
    public void testNewMigration() throws Exception
    {
        Assert.assertNotNull(windupService);
        Assert.assertNotNull(uiTestHarness);
        try (WizardCommandController controller = uiTestHarness.createWizardController(WindupWizard.class))
        {
            controller.initialize();
            Assert.assertTrue(controller.isEnabled());
            controller.setValueFor("input", "testinput");
            Assert.assertFalse(controller.canExecute());
            controller.setValueFor("output", "testoutput");
            Assert.assertFalse(controller.canExecute());
            controller.setValueFor("packages", "org.jboss");
            Assert.assertTrue(controller.canExecute());
        }
    }
}
{'fraction_non_alphanumeric': 0.10601719197707736, 'fraction_numerical': 0.0, 'mean_word_length': 2.973170731707317, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6206258', 'n_tokens_mistral': 1514, 'n_tokens_neox': 1414, 'n_words': 178}