@Override public ClockProvider getClockProvider() { return getDelegate().getClockProvider(); }
@Override public ClockProvider getClockProvider() { return getDelegate().getClockProvider(); }
@Override public ClockProvider getClockProvider() { return getDelegate().getClockProvider(); }
@Override public ClockProvider getClockProvider() { return getDelegate().getClockProvider(); }
@Override public ClockProvider getClockProvider() { return getDelegate().getClockProvider(); }
@Test @SpecAssertion(section = Sections.VALIDATIONAPI_BOOTSTRAPPING_XMLCONFIGURATION, id = "j") public void testClockProviderSpecifiedInValidationXml() throws Exception { assertTrue( TestUtil.getValidatorFactoryUnderTest().getClockProvider() instanceof XmlDefinedClockProvider, "Clock provider configured in XML wasn't applied" ); }
@Test @SpecAssertion(section = Sections.INTEGRATION_GENERAL_OBJECTSLIFECYCLE, id = "d") @SpecAssertion(section = Sections.INTEGRATION_CDI_CUSTOMCONFIGURATION, id = "a") @SpecAssertion(section = Sections.INTEGRATION_CDI, id = "a") public void testClockProviderIsSubjectToDependencyInjection() { assertNotNull( defaultValidatorFactory ); ClockProvider clockProvider = defaultValidatorFactory.getClockProvider(); assertEquals( clockProvider.getClock().getZone(), Greeter.ZONE_ID ); } }
@Test @SpecAssertion(section = Sections.VALIDATIONAPI_BOOTSTRAPPING_VALIDATORFACTORY, id = "f") public void testCustomClockProviderFromValidatorFactory() { Configuration<?> configuration = TestUtil.getConfigurationUnderTest(); CustomClockProvider clockProvider = new CustomClockProvider(); configuration.clockProvider( clockProvider ); ValidatorFactory factory = configuration.buildValidatorFactory(); assertSame( factory.getClockProvider(), clockProvider ); }