Review Comments - give test methods a better name

This commit is contained in:
Katelyn Baker 2017-08-29 16:23:10 +01:00
parent 1e023fcf54
commit 414f2b4b40
2 changed files with 2 additions and 2 deletions

View File

@ -28,7 +28,7 @@ data class BytesAndSchema<T : Any>(val obj: SerializedBytes<T>, val schema: Sche
// Extension for the serialize routine that returns the scheme encoded into the
// bytes as well as the bytes for simple testing
@Throws(NotSerializableException::class)
fun <T : Any> SerializationOutput.serializeRtnSchema(obj: T): BytesAndSchema<T> {
fun <T : Any> SerializationOutput.serializeAndReturnSchema(obj: T): BytesAndSchema<T> {
try {
return BytesAndSchema(_serialize(obj), Schema(schemaHistory.toList()))
} finally {

View File

@ -22,7 +22,7 @@ class SerializeAndReturnSchemaTest {
val a = 1
val b = 2
val sc = SerializationOutput(factory).serializeRtnSchema(C(a, b))
val sc = SerializationOutput(factory).serializeAndReturnSchema(C(a, b))
assertEquals(1, sc.schema.types.size)
assertEquals(classTestName("C"), sc.schema.types.first().name)