public final class ArtifactsSubject
extends com.google.common.truth.Subject
Modifier and Type | Method and Description |
---|---|
org.apache.beam.it.truthmatchers.RecordsSubject |
asAvroRecords(Schema schema)
Parse artifacts to Avro records to be used for assertions.
|
org.apache.beam.it.truthmatchers.RecordsSubject |
asJsonRecords()
Parse artifacts as Json records to be used for assertions.
|
org.apache.beam.it.truthmatchers.RecordsSubject |
asParquetRecords()
Parse artifacts to Parquet GenericRecord to be used for assertions.
|
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
genericRecordToRecords(java.util.List<GenericRecord> avroRecords)
Convert Avro
GenericRecord to a list of maps. |
void |
hasContent(java.lang.String content)
Check if any of the artifacts has a specific content.
|
void |
hasFiles()
Check if artifact list has files (is not empty).
|
void |
hasFiles(int expectedFiles)
Check if artifact list has a specific number of files.
|
void |
hasHash(java.lang.String hash)
Check if any of the artifacts have a specific content hash (using SHA-256).
|
static com.google.common.truth.Subject.Factory<ArtifactsSubject,java.util.List<Artifact>> |
records() |
actualCustomStringRepresentation, check, equals, failWithActual, failWithActual, failWithoutActual, hashCode, ignoreCheck, isAnyOf, isEqualTo, isIn, isInstanceOf, isNoneOf, isNotEqualTo, isNotIn, isNotInstanceOf, isNotNull, isNotSameInstanceAs, isNull, isSameInstanceAs, toString
public static com.google.common.truth.Subject.Factory<ArtifactsSubject,java.util.List<Artifact>> records()
public void hasFiles()
public void hasFiles(int expectedFiles)
expectedFiles
- Expected filespublic void hasContent(java.lang.String content)
content
- Content to search forpublic void hasHash(java.lang.String hash)
hash
- Content to search forpublic org.apache.beam.it.truthmatchers.RecordsSubject asAvroRecords(Schema schema)
schema
- Avro Schema to use on the conversion.public org.apache.beam.it.truthmatchers.RecordsSubject asParquetRecords()
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> genericRecordToRecords(java.util.List<GenericRecord> avroRecords)
GenericRecord
to a list of maps.avroRecords
- Avro Records to parseRecordsSubject
public org.apache.beam.it.truthmatchers.RecordsSubject asJsonRecords()