Allon Mureinik has posted comments on this change.

Change subject: core: redesign MemoryStorageHandlerTest to use mocks
......................................................................


Patch Set 1:

(2 comments)

https://gerrit.ovirt.org/#/c/40435/1//COMMIT_MSG
Commit Message:

Line 6: 
Line 7: core: redesign MemoryStorageHandlerTest to use mocks
Line 8: 
Line 9: This patch redesigns the test class of MemoryStorageHandler to use mocks
Line 10: to make the tests more generic.
The point isn't making the tests more generic, it's making them test the 
MemoryStorageHandler instead of the underlying validator.
Line 11: 
Line 12: Change-Id: Ibe874762dda6967a1bc5e29c973fac7b00fbda70
Line 13: Bug-Url: https://bugzilla.redhat.com/1186230


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

Line 67: 
Line 68:     private void initStorageDomains() {
Line 69:         validStorageDomain = initStorageDomain();
Line 70:         invalidStorageDomain1 = initStorageDomain();
Line 71:         invalidStorageDomain2 = initStorageDomain();
These are all initialized together - what makes one valid and the others not?
The mocking of the validators should be coupled to the initialization of the 
domains, or else the code is difficult to understand.
Line 72:     }
Line 73: 
Line 74:     private StorageDomain initStorageDomain() {
Line 75:         StorageDomain storageDomain = new StorageDomain();


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe874762dda6967a1bc5e29c973fac7b00fbda70
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <[email protected]>
Gerrit-Reviewer: Ala Hino <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Candace Sheremeta <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
Gerrit-Reviewer: Idan Shaby <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[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