Yevgeny Zaspitsky has posted comments on this change. Change subject: core: Use postConstruct in AddVmCommand ......................................................................
Patch Set 3: I agree with Roy. A unit test should relate to the under test unit (in Java case - a class) only. However, as far as we instantiate commands and queries in a non-standard way (constructor through reflection and then use Injector instead of having commands as a managed beans), we can not use standard ways for instantiating under test classes in tests. IMHO we should create a test utility that allows registering mocks to its DI context and then produces a test instance of the under test class. That utility would be amended together withe the changes in CommandFactory&Injector or better use them in its code. Of cause the proposal is not for this patch, but is some thoughts sharing. -- To view, visit http://gerrit.ovirt.org/37601 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ia2ba2b140d4b40fa84beeb0d9c2894f8cc2098ae Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com> Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> Gerrit-Reviewer: Tal Nisan <tni...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches