Martin Mucha has posted comments on this change.

Change subject: core: add support of variableReplacements to 
ValidationResultBuilder
......................................................................


Patch Set 11:

(3 comments)

http://gerrit.ovirt.org/#/c/30662/11/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 84:     private static class IsValid extends 
TypeSafeMatcher<ValidationResult> {
Line 85: 
Line 86:         @Override
Line 87:         public void describeTo(Description description) {
Line 88:             description.appendText("valid ValidationResult");
fixed against describeTo javadoc:  valid result is too abstract, so can be 
misleading in case of validation of bigger objects.
Line 89:         }
Line 90: 
Line 91:         @Override
Line 92:         public boolean matchesSafely(ValidationResult item) {


Line 103:         }
Line 104: 
Line 105:         @Override
Line 106:         public void describeTo(Description description) {
Line 107:             description.appendText("message \"" + 
expected.name()+"\"");
added apostrophes to generate uniform output through all hamcrest matchers
Line 108:         }
Line 109: 
Line 110:         @Override
Line 111:         public boolean matchesSafely(ValidationResult item) {


Line 131:             return matcher.matches(item.getVariableReplacements());
Line 132:         }
Line 133:     }
Line 134: 
Line 135:     private static class HasVariableReplacements extends 
TypeSafeMatcher<ValidationResult> {
I did not find a way how to leverage method 'replacemens' resp class 
'Replacements', since CoreMatchers hasItem and hasItems methods does returns 
differently typed matchers. On top of that, this does a little bit more, 
verifying that there is no extra replacement, which is also wanted verification.
Line 136: 
Line 137:         private final String[] variableReplacements;
Line 138: 
Line 139:         public HasVariableReplacements(String... 
variableReplacements) {


-- 
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: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Martin Mucha <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to