Martin Mucha has posted comments on this change.

Change subject: core: Support replacements in ValidationResult + Matchers
......................................................................


Patch Set 12:

(2 comments)

http://gerrit.ovirt.org/#/c/30662/12/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/ValidationResultMatchers.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/ValidationResultMatchers.java:

Line 140:             this.variableReplacements = variableReplacements;
Line 141:         }
Line 142: 
Line 143:         @Override
Line 144:         protected boolean matchesSafely(ValidationResult item) {
> wouldn't you like to verify null value of the replacements before accessing
yes it should be handled in this patch, but probably dropped in following. I'll 
do that.
DONE.
Line 145:             final List<String> vr = item.getVariableReplacements();
Line 146:             return variableReplacements.length == vr.size() && 
vr.containsAll(Arrays.asList(variableReplacements));
Line 147:         }
Line 148: 


Line 160:             matcher = both(not(isValid())).and(new 
WithMessage(expected));
Line 161:         }
Line 162: 
Line 163:         public Fails(VdcBllMessages expected, String... 
variableReplacements) {
Line 164:             matcher = CoreMatchers.allOf(
> you should also replace the access to CoreMatchers.allOf with a static impo
Done
Line 165:                     not(isValid()),
Line 166:                     new WithMessage(expected),
Line 167:                     hasVariableReplacements(variableReplacements));
Line 168: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3d931b52d97bbac855c17ac13ee3acbda0c0f6fe
Gerrit-PatchSet: 12
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Lior Vernia <lver...@redhat.com>
Gerrit-Reviewer: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Mike Kolesnik <mkole...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
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