Last active
June 30, 2020 01:37
-
-
Save ferPrieto/d78749bbe9ac10e89c8ee74d7c4fdb28 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class InstagramErrorByClassTest { | |
@Nested | |
@TestInstance(TestInstance.Lifecycle.PER_CLASS) | |
inner class MixedConstructors { | |
private val instagramErrors = mutableListOf<String>() | |
@AfterAll | |
fun check() { | |
Assertions.assertEquals( | |
listOf( | |
"DeclinePost", | |
"TooLongVideoPost", | |
"TimeoutStory", | |
"TooShortIGTvPost", | |
"TimeOutIGTvPost" | |
), instagramErrors | |
) | |
} | |
@ParameterizedTest | |
@SealedClassesSource(factoryClass = InstagramTypeFactory::class) | |
fun build(member: InstagramErrorType) { | |
instagramErrors.add(member::class.simpleName!!) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment