-
Notifications
You must be signed in to change notification settings - Fork 192
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
[T4A6][T11-B3] #1688
base: master
Are you sure you want to change the base?
[T4A6][T11-B3] #1688
Conversation
…stal and block classes validate whether the correct number has been entered and if so how many digit numbers have been added (postal code has 6 digits).
…Phone classes are extended/inherited.
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.
@dheerajaraj Some comments added. Please close the PR after reading comments.
pls name your pull requests properly & ensure different activites each have their own branches. also pls make sure commit messages are written properly
public class UtilsTest { | ||
|
||
@Test | ||
public void testElementsAreUnique() { |
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.
Note that we have a special naming convention for test method names. Please refer coding standard for more details
|
||
@Test | ||
public void testElementsAreUnique() { | ||
Utils util= new Utils(); |
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.
the methods tested are static methods so don't need to instantiate Utils
ArrayList<String> testDuplicate = new ArrayList<String>(); | ||
testDuplicate.add("Apple"); | ||
testDuplicate.add("Apple"); | ||
assertTrue("Null objects present must return true", util.elementsAreUnique(testDuplicate)); |
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.
message doesn't seem to match test... also, shouldn't this be returning false?
import static org.junit.Assert.*; | ||
|
||
import java.awt.List; | ||
import java.util.*; |
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.
import specific imports rather than everything. can use eclipse's 'organise imports' to do this
No description provided.