@Test public void validateDifferentDependenciesListTest() { dependencies.add(createDependency(0, "0.8.0", "mule-plugin")); dependencies.add(createDependency(1, "1.0.0", "mule-plugin")); try { validator.validate(dependencies); } catch (ValidationException e) { fail("Different mule-plugins should be valid"); } }
public void validate(List<ArtifactCoordinates> mulePlugins) throws ValidationException { for (Map.Entry<String, List<ArtifactCoordinates>> entry : buildDependencyMap(mulePlugins).entrySet()) { List<ArtifactCoordinates> dependencies = entry.getValue(); if (dependencies.size() > 1 && !areMulePluginVersionCompatible(dependencies)) { throw new ValidationException(createErrorMessage(entry.getKey(), dependencies)); } } }
MulePluginsCompatibilityValidator { public void validate(List<ArtifactCoordinates> mulePlugins) throws ValidationException { for (Map.Entry<String, List<ArtifactCoordinates>> entry : buildDependencyMap(mulePlugins).entrySet()) { List<ArtifactCoordinates> dependencies = entry.getValue(); if (dependencies.size() > 1 && !areMulePluginVersionCompatible(dependencies)) { throw new ValidationException(createErrorMessage(entry.getKey(), dependencies)); } } } }
MulePluginsCompatibilityValidator { public void validate(List<ArtifactCoordinates> mulePlugins) throws ValidationException { for (Map.Entry<String, List<ArtifactCoordinates>> entry : buildDependencyMap(mulePlugins).entrySet()) { List<ArtifactCoordinates> dependencies = entry.getValue(); if (dependencies.size() > 1 && !areMulePluginVersionCompatible(dependencies)) { throw new ValidationException(createErrorMessage(entry.getKey(), dependencies)); } } }  }
MulePluginsCompatibilityValidator { public void validate(List<ArtifactCoordinates> mulePlugins) throws ValidationException { for (Map.Entry<String, List<ArtifactCoordinates>> entry : buildDependencyMap(mulePlugins).entrySet()) { List<ArtifactCoordinates> dependencies = entry.getValue(); if (dependencies.size() > 1 && !areMulePluginVersionCompatible(dependencies)) { throw new ValidationException(createErrorMessage(entry.getKey(), dependencies)); } } }  void validate(List<ArtifactCoordinates> mulePlugins); }
MulePluginsCompatibilityValidator { public void validate(List<ArtifactCoordinates> mulePlugins) throws ValidationException { for (Map.Entry<String, List<ArtifactCoordinates>> entry : buildDependencyMap(mulePlugins).entrySet()) { List<ArtifactCoordinates> dependencies = entry.getValue(); if (dependencies.size() > 1 && !areMulePluginVersionCompatible(dependencies)) { throw new ValidationException(createErrorMessage(entry.getKey(), dependencies)); } } }  void validate(List<ArtifactCoordinates> mulePlugins);  }