Conditions | 2 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | package com.hltech.vaunt.validator.schema; |
||
10 | @Override |
||
11 | public List<String> validate(JsonSchema consumerSchema, JsonSchema providerSchema) { |
||
12 | List<String> errors = super.validate(consumerSchema, providerSchema); |
||
13 | |||
14 | IntegerSchema consumerIntegerSchema = consumerSchema.asIntegerSchema(); |
||
15 | IntegerSchema providerIntegerSchema = providerSchema.asIntegerSchema(); |
||
16 | |||
17 | if (!isValid(consumerIntegerSchema.getDivisibleBy(), providerIntegerSchema.getDivisibleBy())) { |
||
18 | errors.add(String.format(ERROR_FORMAT, |
||
19 | consumerIntegerSchema.getId(), |
||
20 | "divisibleBy", |
||
21 | consumerIntegerSchema.getDivisibleBy(), |
||
22 | providerIntegerSchema.getDivisibleBy())); |
||
23 | } |
||
24 | |||
25 | return errors; |
||
26 | } |
||
33 |