Hi,
I'm sorry that I'm revitalizing this thread, but I' like to discuss a thing
or two regarding (DS) and mocking.

Scenario:
Running IT tests using embedded and @classrules.

testfile:
@PropertyFile("test-lab.properties")
public class MockIT {
}

In test-lab.properties I can define project stage, ex:
org.apache.deltaspike.ProjectStage=IntegrationTest

So in my project I have:

@Exclude(exceptIfProjectStage = ProjectStage.Production.class)
HelloBean impl HelloBeanLocal

and I've added in test classes:
@Exclude(exceptIfProjectStage = ProjectStage.IntegrationTest.class)
MockHelloBean impl HelloBeanLocal


I can define different "cdi mocks" dependening on what I want to test,

Now, what about Deltaspike repositories?

Is it possible to do somthing similar with a:

public abstract class HelloRepository extends AbstractEntityRepository<> ?

The reason for asking is that I have'nt been able to, probably because my
lack of thouough cdi knowledge....

I know I can do something similar to the example
"cdi-alternative-and-stereotypes" but I like the @exclude dynamics from DS.

br hw




--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Alternatives-and-beans-xml-tp4670031p4671514.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Reply via email to