mooli tayer has posted comments on this change.

Change subject: core: test Commands using Arquillian
......................................................................


Patch Set 7:

(8 comments)

http://gerrit.ovirt.org/#/c/17630/7//COMMIT_MSG
Commit Message:

Line 8: 
Line 9: This is a simple reference test class which tests
Line 10: the basic functionality of dependency injection into test classes.
Line 11: 
Line 12: It contains a test class which have an instance member field that
fix: which has
Line 13: extends CommandBase.
Line 14: 
Line 15:  @Inject CDITestCommand cmd
Line 16: 


http://gerrit.ovirt.org/#/c/17630/7/backend/manager/modules/bll/pom.xml
File backend/manager/modules/bll/pom.xml:

Line 147: >
What does 6 here mean?


Line 151:     </dependency>
Line 152:     <dependency>
Line 153:       <groupId>org.jboss.arquillian.junit</groupId>
Line 154:       <artifactId>arquillian-junit-container</artifactId>
Line 155:       <scope>test</scope>
no version. does it appear in <dependencyManegement> somewhere?
Line 156:     </dependency>
Line 157:     <dependency>
Line 158:       <groupId>org.jboss.arquillian.container</groupId>
Line 159:       <artifactId>arquillian-weld-ee-embedded-1.1</artifactId>


Line 160:       <scope>test</scope>
Line 161:     </dependency>
Line 162:     <dependency>
Line 163:       <groupId>org.jboss.weld</groupId>
Line 164:       <artifactId>weld-core</artifactId>
How come this is only added in the patch and not the first one?
Line 165:       <version>1.1.5.Final</version>
Line 166:       <scope>test</scope>
Line 167:     </dependency>
Line 168:   </dependencies>


http://gerrit.ovirt.org/#/c/17630/7/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommandBaseDependenciesTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/CommandBaseDependenciesTest.java:

Line 23:     CDITestCommand cmd;
Line 24: 
Line 25:     @Test
Line 26:     /**
Line 27:      *  compare the expected injected class simple name with the class 
supplied deployed.
fix: deployed OR supplied
Line 28:      */
Line 29:     public void testDependenciesFullfiled() {
Line 30:         Assert.assertEquals(MockDbFacade.class.getSimpleName(), 
cmd.dbFacade.getClass().getSimpleName());
Line 31:     }


Line 31:     }
Line 32: 
Line 33: 
Line 34:     /**
Line 35:      * deploy an jar archive with a our test class and empty beans.xml 
into the container
fix: deploy a jar archive with our test class and an empty beans.xml into the 
container
Line 36:      */
Line 37:     @Deployment
Line 38:     public static JavaArchive createDeployment() {
Line 39:         return ShrinkWrap.create(JavaArchive.class)


Line 34:     /**
Line 35:      * deploy an jar archive with a our test class and empty beans.xml 
into the container
Line 36:      */
Line 37:     @Deployment
Line 38:     public static JavaArchive createDeployment() {
really useful stuff
Line 39:         return ShrinkWrap.create(JavaArchive.class)
Line 40:                 .addClasses(CDITestCommand.class, MockDbFacade.class, 
MockConfig.class)
Line 41:                 .addAsManifestResource(EmptyAsset.INSTANCE, 
"beans.xml");
Line 42:     }


Line 44: 
Line 45:     /**
Line 46:      * A Command that test that the actual dependencies of Commands 
gets injected.
Line 47:      */
Line 48:     static public class CDITestCommand extends 
CommandBase<VdcActionParametersBase> {
I guess you could remove this and use an existing command but up to you.
Line 49: 
Line 50:         public CDITestCommand() {
Line 51:         }
Line 52: 


-- 
To view, visit http://gerrit.ovirt.org/17630
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4b264529ffeb3a15215a5497adfa926ad75a256d
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Itamar Heim <ih...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Ravi Nori <rn...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: mooli tayer <mta...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to