Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ContainersImpl, fix a nasty problem where mock contexts weren't b…
…eing reset git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@1001 1c488680-804c-0410-94cd-c6b725194a0e
- Loading branch information
Showing
12 changed files
with
96 additions
and
27 deletions.
There are no files selected for viewing
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
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
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
16 changes: 16 additions & 0 deletions
16
webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockApplicationContext.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,16 @@ | ||
package org.jboss.webbeans.test.mock; | ||
|
||
import org.jboss.webbeans.context.ApplicationContext; | ||
import org.jboss.webbeans.context.beanmap.SimpleBeanMap; | ||
|
||
public class MockApplicationContext extends ApplicationContext | ||
{ | ||
|
||
public MockApplicationContext() | ||
{ | ||
super(); | ||
ApplicationContext.INSTANCE = this; | ||
setBeanMap(new SimpleBeanMap()); | ||
} | ||
|
||
} |
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
14 changes: 14 additions & 0 deletions
14
webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockDependentContext.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,14 @@ | ||
package org.jboss.webbeans.test.mock; | ||
|
||
import org.jboss.webbeans.context.DependentContext; | ||
|
||
public class MockDependentContext extends DependentContext | ||
{ | ||
|
||
public MockDependentContext() | ||
{ | ||
super(); | ||
DependentContext.INSTANCE = this; | ||
} | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockRequestContext.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,14 @@ | ||
package org.jboss.webbeans.test.mock; | ||
|
||
import org.jboss.webbeans.context.RequestContext; | ||
|
||
public class MockRequestContext extends RequestContext | ||
{ | ||
|
||
public MockRequestContext() | ||
{ | ||
super(); | ||
RequestContext.INSTANCE = this; | ||
} | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
webbeans-ri/src/test/java/org/jboss/webbeans/test/mock/MockSessionContext.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,16 @@ | ||
package org.jboss.webbeans.test.mock; | ||
|
||
import org.jboss.webbeans.context.SessionContext; | ||
import org.jboss.webbeans.context.beanmap.SimpleBeanMap; | ||
|
||
public class MockSessionContext extends SessionContext | ||
{ | ||
|
||
public MockSessionContext() | ||
{ | ||
super(); | ||
SessionContext.INSTANCE = this; | ||
setBeanMap(new SimpleBeanMap()); | ||
} | ||
|
||
} |
19 changes: 19 additions & 0 deletions
19
webbeans-ri/src/test/java/org/jboss/webbeans/test/tck/ContainersImpl.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,19 @@ | ||
package org.jboss.webbeans.test.tck; | ||
|
||
import javax.webbeans.manager.Manager; | ||
|
||
import org.jboss.webbeans.tck.api.Containers; | ||
import org.jboss.webbeans.test.mock.MockBootstrap; | ||
import org.jboss.webbeans.test.mock.MockWebBeanDiscovery; | ||
|
||
public class ContainersImpl implements Containers | ||
{ | ||
|
||
public Manager deploy(Class<?>... classes) | ||
{ | ||
MockBootstrap bootstrap = new MockBootstrap(); | ||
bootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(classes)); | ||
bootstrap.boot(); | ||
return bootstrap.getManager(); | ||
} | ||
} |
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
3 changes: 2 additions & 1 deletion
3
webbeans-ri/src/test/resources/META-INF/web-beans-tck.properties
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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
org.jboss.webbeans.tck.api.Managers=org.jboss.webbeans.test.tck.ManagersImpl | ||
org.jboss.webbeans.tck.api.Beans=org.jboss.webbeans.test.tck.BeansImpl | ||
org.jboss.webbeans.tck.api.Contexts=org.jboss.webbeans.test.tck.ContextsImpl | ||
org.jboss.webbeans.tck.api.Contexts=org.jboss.webbeans.test.tck.ContextsImpl | ||
org.jboss.webbeans.tck.api.Containers=org.jboss.webbeans.test.tck.ContainersImpl |
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