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));
}
Aggregations