@Test public void returns_validation_suitable_for_two_versions() { ApiVersionValidation validation = factoryToTest.createValidationAccepting("1.0", "1.1"); assertTrue(validation.validate("1.0").isValid()); assertTrue(validation.validate("1.1").isValid()); assertFalse(validation.validate("0.1").isValid()); }
public ApiVersionValidation createValidationAccepting(String ...acceptedVersions) { return new ApiVersionValidationImpl(acceptedVersions); }
ApiVersionValidationFactory { public ApiVersionValidation createValidationAccepting(String ...acceptedVersions) { return new ApiVersionValidationImpl(acceptedVersions); } }
ApiVersionValidationFactory { public ApiVersionValidation createValidationAccepting(String ...acceptedVersions) { return new ApiVersionValidationImpl(acceptedVersions); }  }
ApiVersionValidationFactory { public ApiVersionValidation createValidationAccepting(String ...acceptedVersions) { return new ApiVersionValidationImpl(acceptedVersions); }  ApiVersionValidation createValidationAccepting(String ...acceptedVersions); }
ApiVersionValidationFactory { public ApiVersionValidation createValidationAccepting(String ...acceptedVersions) { return new ApiVersionValidationImpl(acceptedVersions); }  ApiVersionValidation createValidationAccepting(String ...acceptedVersions);  }