-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
unit test for optIn, multiOptIn, confirmation eligibility check implemented #15
Conversation
creative-dev-lab
commented
May 12, 2022
•
edited
Loading
edited
- JSON Mapping data loading check
- Eligibility checks for the OptIn widget with all possible conditions
- Eligibility checks for the MultiOption with all possible conditions
- Eligibility checks for the ConfirmationWidget
@@ -0,0 +1,425 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mock json data added here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I don't know a typical android project structure, but I might have expected "mock" or something in the file path, but if you think this is ok, then cool 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added JSON as a mock data instead of adding a mock object in the specific file because this can simulate how we parse the JSON data from the api call.
And if we are going to create the mock object, it's going to be a very huge object and I cannot create it one by one.
} | ||
|
||
@Test | ||
fun testOptInEligibility() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OptIn Eligibility check here 👇
} | ||
} | ||
|
||
private val optInInput = arrayListOf( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can add as many possible cases as we can here. 👇
) | ||
|
||
@Test | ||
fun testMultiOptInEligibility() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MultiOptIn eligibility check here
) | ||
|
||
@Test | ||
fun testConfirmationEligibility() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confirmation widget eligibility check here