-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
ui/tests/src/test/java/org/jboss/forge/addon/ui/impl/UIInputResourceInjectionTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/* | ||
* Copyright 2013 Red Hat, Inc. and/or its affiliates. | ||
* | ||
* Licensed under the Eclipse Public License version 1.0, available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
*/ | ||
|
||
package org.jboss.forge.addon.ui.impl; | ||
|
||
import javax.inject.Inject; | ||
|
||
import org.jboss.arquillian.container.test.api.Deployment; | ||
import org.jboss.arquillian.junit.Arquillian; | ||
import org.jboss.forge.addon.resource.FileResource; | ||
import org.jboss.forge.addon.ui.input.UIInput; | ||
import org.jboss.forge.arquillian.Addon; | ||
import org.jboss.forge.arquillian.Dependencies; | ||
import org.jboss.forge.arquillian.archive.ForgeArchive; | ||
import org.jboss.forge.furnace.addons.AddonId; | ||
import org.jboss.forge.furnace.repositories.AddonDependencyEntry; | ||
import org.jboss.shrinkwrap.api.ShrinkWrap; | ||
import org.junit.Assert; | ||
import org.junit.Ignore; | ||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
|
||
@RunWith(Arquillian.class) | ||
@Ignore("FORGE-876") | ||
public class UIInputResourceInjectionTest | ||
{ | ||
@Deployment | ||
@Dependencies({ | ||
@Addon(name = "org.jboss.forge.addon:ui", version = "2.0.0-SNAPSHOT"), | ||
@Addon(name = "org.jboss.forge.addon:resources", version = "2.0.0-SNAPSHOT") }) | ||
public static ForgeArchive getDeployment() | ||
{ | ||
ForgeArchive archive = ShrinkWrap | ||
.create(ForgeArchive.class) | ||
.addBeansXML() | ||
.addAsAddonDependencies( | ||
AddonDependencyEntry.create(AddonId.from("org.jboss.forge.addon:ui", "2.0.0-SNAPSHOT")), | ||
AddonDependencyEntry.create(AddonId.from("org.jboss.forge.addon:resources", "2.0.0-SNAPSHOT"))); | ||
|
||
return archive; | ||
} | ||
|
||
@Inject | ||
UIInput<FileResource<?>> firstName; | ||
|
||
@Test | ||
public void testInjectionNotNull() | ||
{ | ||
Assert.assertNotNull(firstName); | ||
} | ||
|
||
@Test | ||
public void testInputValues() | ||
{ | ||
Assert.assertEquals("firstName", firstName.getName()); | ||
Assert.assertEquals(FileResource.class, firstName.getValueType()); | ||
} | ||
|
||
} |