Moti Asayag has posted comments on this change.

Change subject: core: create a Junit rule for o.o.e.c.di.Injector
......................................................................


Patch Set 1: Code-Review+2

(3 comments)

https://gerrit.ovirt.org/#/c/40733/1/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/InjectorRule.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/InjectorRule.java:

Line 8: 
Line 9: public class InjectorRule extends TestWatcher{
Line 10: 
Line 11:     // create a new injector instance
Line 12:     private Injector mockedInjector= Mockito.mock(Injector.class);
please use static import for consistency
Line 13: 
Line 14:     public InjectorRule() {
Line 15:         try {
Line 16:             // set the internal injector


Line 18: c
Heinz Kabutz would be very proud to see you melding fields like that.


Line 22:             throw new RuntimeException(e);
Line 23:         }
Line 24:     }
Line 25: 
Line 26:     public <T> void bind(Class<T> pureClsType, T instance) {
same
Line 27:         
Mockito.when(mockedInjector.instanceOf(pureClsType)).thenReturn(instance);
Line 28:     }
Line 29: 
Line 30: 


-- 
To view, visit https://gerrit.ovirt.org/40733
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I8276e8514135f466b59fae384678b2a0a54cf854
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to