Search in sources :

Example 76 with ValidationViolation

use of com.spotify.protoman.validation.ValidationViolation in project protoman by spotify.

the class ServiceRemovalRuleTest method testNoChange.

@Test
public void testNoChange() throws Exception {
    final DescriptorSet current = DescriptorSetUtils.buildDescriptorSet("a.proto", "syntax = 'proto3';\n" + "service Derp {\n" + "}\n");
    final DescriptorSet candidate = DescriptorSetUtils.buildDescriptorSet("a.proto", "syntax = 'proto3';\n" + "service Derp {\n" + "}\n");
    final ImmutableList<ValidationViolation> violations = schemaValidator.validate(current, candidate);
    assertThat(violations, is(empty()));
}
Also used : ValidationViolation(com.spotify.protoman.validation.ValidationViolation) DescriptorSet(com.spotify.protoman.descriptor.DescriptorSet) Test(org.junit.Test)

Aggregations

ValidationViolation (com.spotify.protoman.validation.ValidationViolation)76 DescriptorSet (com.spotify.protoman.descriptor.DescriptorSet)75 Test (org.junit.Test)74 Parameters (junitparams.Parameters)43 DescriptorBuilderException (com.spotify.protoman.descriptor.DescriptorBuilderException)1 GenericDescriptor (com.spotify.protoman.descriptor.GenericDescriptor)1 SchemaStorage (com.spotify.protoman.registry.storage.SchemaStorage)1 Path (java.nio.file.Path)1 Nullable (javax.annotation.Nullable)1