[ 
https://issues.apache.org/jira/browse/DELTASPIKE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14234265#comment-14234265
 ] 

Rafael Benevides commented on DELTASPIKE-588:
---------------------------------------------

EntityRepository interface now implements Deactivatable. 

If using 
{code}
@Repository(forEntity = Person.class)
public abstract class PersonRepository 
{code}

then the abstract class should implement Deactivatable by itself to be 
deactivated. Example:

{code}
@Repository(forEntity = Person.class)
public abstract class PersonRepository implements Deactivatable
{code}

When the repository is "inactive" the "Unknown Repository classes" exception is 
thrown at Runtime.

> Repositories from Data module should be deactivatable
> -----------------------------------------------------
>
>                 Key: DELTASPIKE-588
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-588
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: Data-Module
>            Reporter: Karl Kildén
>            Assignee: Rafael Benevides
>            Priority: Minor
>         Attachments: DELTASPIKE-588.diff
>
>
> Unit testing with Test-Control is great. However since you don't control the 
> actual implementation of the Repositories from data-module they are to hard 
> to mock away.
> Either provide a built in project stage for this purpose -> 
> ProjectStage.MockFriendlyUnitTest or make it Deactivatable like other 
> components are.
> The end user would benefit a lot from being able to mock away repositories in 
> certain unit tests.  



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to