public class SpannerAsserts
extends java.lang.Object
Constructor and Description |
---|
SpannerAsserts() |
Modifier and Type | Method and Description |
---|---|
static org.apache.beam.it.truthmatchers.RecordsSubject |
assertThatMutations(java.util.List<com.google.cloud.spanner.Mutation> mutations)
Creates a
RecordsSubject to assert information within a list of records. |
static org.apache.beam.it.truthmatchers.RecordsSubject |
assertThatStructs(java.util.List<com.google.cloud.spanner.Struct> structs)
Creates a
RecordsSubject to assert information within a list of records. |
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
mutationsToRecords(java.util.List<com.google.cloud.spanner.Mutation> mutations)
Convert Spanner
Mutation list to a list of maps. |
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
mutationsToRecords(java.util.List<com.google.cloud.spanner.Mutation> mutations,
java.util.List<java.lang.String> columns)
Convert a list of Spanner
Mutation objects into a list of maps, extracting specified
columns. |
static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> |
structsToRecords(java.util.List<com.google.cloud.spanner.Struct> structs)
Convert Spanner
Struct list to a list of maps. |
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> structsToRecords(java.util.List<com.google.cloud.spanner.Struct> structs)
Struct
list to a list of maps.structs
- Structs to parseRecordsSubject
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> mutationsToRecords(java.util.List<com.google.cloud.spanner.Mutation> mutations)
Mutation
list to a list of maps.mutations
- Mutations to parseRecordsSubject
public static java.util.List<java.util.Map<java.lang.String,java.lang.Object>> mutationsToRecords(java.util.List<com.google.cloud.spanner.Mutation> mutations, java.util.List<java.lang.String> columns)
Mutation
objects into a list of maps, extracting specified
columns.mutations
- The list of mutations to process.columns
- The columns to extract.RecordsSubject
public static org.apache.beam.it.truthmatchers.RecordsSubject assertThatStructs(java.util.List<com.google.cloud.spanner.Struct> structs)
RecordsSubject
to assert information within a list of records.structs
- Records in Spanner Struct
format to use in the comparison.public static org.apache.beam.it.truthmatchers.RecordsSubject assertThatMutations(java.util.List<com.google.cloud.spanner.Mutation> mutations)
RecordsSubject
to assert information within a list of records.mutations
- Mutations in Spanner Mutation
format to use in the comparison.