• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.android.onboarding.contracts.testing
2 
3 import com.android.onboarding.contracts.IntentSerializer
4 import org.junit.Test
5 
6 abstract class IntentSerializerTest<V : Any> {
7   protected abstract val target: IntentSerializer<V>
8   protected abstract val data: V
9 
10   @Test
completeArgument_encodesCorrectlynull11   fun completeArgument_encodesCorrectly() {
12     assertIntentEncodesCorrectly(target, data)
13   }
14 }
15 
16 abstract class NodeAwareIntentSerializerTest<V : Any> : IntentSerializerTest<V>() {
17   @Test
noExtras_decodingFailsLazilynull18   fun noExtras_decodingFailsLazily() {
19     assertEmptyIntentDecodingFailsLazily(target)
20   }
21 }
22