Skip to content
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

Add a class to validate register form #158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

SangeethaTestPress
Copy link
Contributor

Changes done

  • Added a class to validate register form. This will ensure Single Responsibility Principle.
  • Tested the class with JUnit and Mockito

Guidelines

  • [+] Have you self reviewed this PR in context to the previous PR feedbacks?

return isValid
}

private fun checkAndSetEmptyError() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function is doing more than one thing. Also the name is not meaningful.

package `in`.testpress.testpress.util

import `in`.testpress.testpress.authenticator.RegisterActivity.VerificationMethod
import `in`.testpress.testpress.databinding.RegisterActivityBinding
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't find this file. Was this missed?

verifyConfirmPassword()
}

private fun verifyUserName() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The names aren't explaining what this method is doing. Verify is bit vague. How do you verify? What is the action?

Similarly with other methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants