[forge-issues] [JBoss JIRA] (FORGE-1209) Imported<?>.isSatisfied ignores custom scopes
George Gastaldi (JIRA)
jira-events at lists.jboss.org
Mon Sep 16 13:54:03 EDT 2013
George Gastaldi created FORGE-1209:
--------------------------------------
Summary: Imported<?>.isSatisfied ignores custom scopes
Key: FORGE-1209
URL: https://issues.jboss.org/browse/FORGE-1209
Project: Forge
Issue Type: Bug
Components: Furnace (Container)
Reporter: George Gastaldi
Fix For: 2.x Future
Imported.isSatisfied returns true for objects without an active contexts.
eg:
{code:java}
@CommandScoped
public class CommandScopedModel
{code}
The following test fails:
Having :
{code:java}
@Inject
private Imported<CommandScopedModel> modelInstance;
{code}
Considering that the custom scope context is implemented correctly, the following code fails in the first assertion:
{code:java}
@Test
public void testImportedWithCustomScope() throws Exception
{
Assert.assertFalse("Should not be satisfied since there is no Context in scope", modelInstance.isSatisfied());
Assert.assertTrue(wizardTester.isValid());
Assert.assertTrue("Should be satisfied since there command context was initialized", modelInstance.isSatisfied());
wizardTester.finish(null);
Assert.assertFalse("Should not be satisfied since there is no Context in scope after finish is called",
modelInstance.isSatisfied());
}
{code}
This is implemented in the ui-addon: {{org.jboss.forge.addon.ui.scope.CommandScopedTest.testImportedWithCustomScope()}}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the forge-issues
mailing list