use of com.yahoo.config.model.MockModelContext in project vespa by vespa-engine.
the class VespaModelFactoryTest method testThatFactoryModelValidationFailsWithIllegalArgumentException.
// Uses an application package that throws IllegalArgumentException when validating
@Test(expected = IllegalArgumentException.class)
public void testThatFactoryModelValidationFailsWithIllegalArgumentException() {
VespaModelFactory modelFactory = new VespaModelFactory(new NullConfigModelRegistry());
modelFactory.createAndValidateModel(new MockModelContext(createApplicationPackageThatFailsWhenValidating()), false);
}
use of com.yahoo.config.model.MockModelContext in project vespa by vespa-engine.
the class VespaModelFactoryTest method testThatFactoryModelValidationCanBeIgnored.
@Test
public void testThatFactoryModelValidationCanBeIgnored() {
VespaModelFactory modelFactory = new VespaModelFactory(new NullConfigModelRegistry());
ModelCreateResult createResult = modelFactory.createAndValidateModel(new MockModelContext(createApplicationPackageThatFailsWhenValidating()), true);
assertNotNull(createResult.getModel());
assertNotNull(createResult.getConfigChangeActions());
assertTrue(createResult.getConfigChangeActions().isEmpty());
}
Aggregations