for (MigrationVersion testVersion : testVersions) { testSpecifications.add( TestSpecification.<T>builder( getSpecNameForVersion(name, testVersion), serializerClass, snapshotClass, testVersion) .withNewSerializerProvider(serializerProvider) .withSnapshotDataLocation( String.format(DEFAULT_SNAPSHOT_FILENAME_FORMAT, testVersion, name)) .withTestData( String.format(DEFAULT_TEST_DATA_FILENAME_FORMAT, testVersion, name), DEFAULT_TEST_DATA_COUNT) .withTestDataMatcher(elementMatcher) );
for (MigrationVersion testVersion : testVersions) { testSpecifications.add( TestSpecification.<T>builder( getSpecNameForVersion(name, testVersion), serializerClass, snapshotClass, testVersion) .withNewSerializerProvider(serializerProvider) .withSnapshotDataLocation(testSnapshotFilenameProvider.get(testVersion)) .withTestData(testDataFilenameProvider.get(testVersion), testDataCount) );
for (MigrationVersion testVersion : testVersions) { testSpecifications.add( TestSpecification.<T>builder( getSpecNameForVersion(name, testVersion), serializerClass, snapshotClass, testVersion) .withNewSerializerProvider(serializerProvider) .withSnapshotDataLocation( String.format(DEFAULT_SNAPSHOT_FILENAME_FORMAT, testVersion, name)) .withTestData( String.format(DEFAULT_TEST_DATA_FILENAME_FORMAT, testVersion, name), DEFAULT_TEST_DATA_COUNT)
public TestSpecification<T> withNewSerializerProvider(Supplier<? extends TypeSerializer<T>> serializerProvider) { return withNewSerializerProvider(serializerProvider, TypeSerializerSchemaCompatibility.compatibleAsIs()); }
@SuppressWarnings("unchecked") public static <T> TestSpecification<T> builder( String name, Class<? extends TypeSerializer> serializerClass, Class<? extends TypeSerializerSnapshot> snapshotClass, MigrationVersion testMigrationVersion) { return new TestSpecification<>( name, (Class<? extends TypeSerializer<T>>) serializerClass, (Class<? extends TypeSerializerSnapshot<T>>) snapshotClass, testMigrationVersion); }