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

[T4A6][T11-B3] #1688

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

Conversation

dheerajaraj
Copy link

No description provided.

Copy link

@kychua kychua left a 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() {
Copy link

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();
Copy link

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));
Copy link

@kychua kychua Sep 21, 2016

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.*;
Copy link

@kychua kychua Sep 21, 2016

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

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

Successfully merging this pull request may close these issues.

2 participants