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 <[email protected]> Gerrit-Reviewer: Alona Kaplan <[email protected]> Gerrit-Reviewer: Arik Hadas <[email protected]> Gerrit-Reviewer: Lior Vernia <[email protected]> Gerrit-Reviewer: Liran Zelkha <[email protected]> Gerrit-Reviewer: Martin Mucha <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Tal Nisan <[email protected]> Gerrit-Reviewer: Yair Zaslavsky <[email protected]> Gerrit-Reviewer: Yevgeny Zaspitsky <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: No _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
