Skip to content

Instantly share code, notes, and snippets.

@ArunYogeshwaran
Created July 6, 2023 14:05
Show Gist options
  • Save ArunYogeshwaran/c90591868bc83344ddb9ffacb1d573b2 to your computer and use it in GitHub Desktop.
Save ArunYogeshwaran/c90591868bc83344ddb9ffacb1d573b2 to your computer and use it in GitHub Desktop.
// The condition here is that the private method is made public or package-private using the `VisibleForTesting` annotation.
@Test
fun `is referral valid with new referral expected value is true`() {
val friendReferral = getInstance()
asserTrue(friendReferral.isReferralValid(…))
}
// The condition here is that the private method is made public or package-private using the `VisibleForTesting` annotation.
@Test
fun `process referral valid with new referral verify referral successful`() {
val friendReferral = getInstance()
friendReferral.processReferral("testUserId")
assertThat(referralList.contains("testUserId")).isTrue()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment