Search in sources :

Example 1 with DescriptorSetPair

use of com.spotify.protoman.testutil.DescriptorSetPair in project protoman by spotify.

the class SemverSchemaVersionerTest method testDetermineVersion.

@Test
@Parameters(method = "testParams")
public void testDetermineVersion(final Path root, final String protoPackage, final SchemaVersion currentVersion, final SchemaVersion expectedVersion) throws Exception {
    final SemverSchemaVersioner sut = SemverSchemaVersioner.create();
    final DescriptorSetPair descriptorSetPair = DescriptorSetUtils.buildDescriptorSetPair(root);
    final SchemaVersion version = sut.determineVersion(protoPackage, currentVersion, descriptorSetPair.current(), descriptorSetPair.candidate());
    assertThat(version, equalTo(expectedVersion));
}
Also used : DescriptorSetPair(com.spotify.protoman.testutil.DescriptorSetPair) Parameters(junitparams.Parameters) Test(org.junit.Test)

Aggregations

DescriptorSetPair (com.spotify.protoman.testutil.DescriptorSetPair)1 Parameters (junitparams.Parameters)1 Test (org.junit.Test)1