Skip to content

Commit

Permalink
Fix minor checkstyleTest error
Browse files Browse the repository at this point in the history
  • Loading branch information
joloong committed Oct 19, 2019
1 parent b84bd8c commit 473be38
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import java.util.List;

import org.junit.jupiter.api.Test;

import seedu.address.testutil.TransactionBuilder;


Expand All @@ -18,14 +19,17 @@ public void equals() {
List<String> firstPredicateKeywordList = Collections.singletonList("first");
List<String> secondPredicateKeywordList = Arrays.asList("first", "second");

TransactionContainsTagsPredicate firstPredicate = new TransactionContainsTagsPredicate(firstPredicateKeywordList);
TransactionContainsTagsPredicate secondPredicate = new TransactionContainsTagsPredicate(secondPredicateKeywordList);
TransactionContainsTagsPredicate firstPredicate =
new TransactionContainsTagsPredicate(firstPredicateKeywordList);
TransactionContainsTagsPredicate secondPredicate =
new TransactionContainsTagsPredicate(secondPredicateKeywordList);

// same object -> returns true
assertTrue(firstPredicate.equals(firstPredicate));

// same values -> returns true
TransactionContainsTagsPredicate firstPredicateCopy = new TransactionContainsTagsPredicate(firstPredicateKeywordList);
TransactionContainsTagsPredicate firstPredicateCopy =
new TransactionContainsTagsPredicate(firstPredicateKeywordList);
assertTrue(firstPredicate.equals(firstPredicateCopy));

// different types -> returns false
Expand All @@ -41,7 +45,8 @@ public void equals() {
@Test
public void test_tagContainsKeywords_returnsTrue() {
// One keyword
TransactionContainsTagsPredicate predicate = new TransactionContainsTagsPredicate(Collections.singletonList("Alice"));
TransactionContainsTagsPredicate predicate =
new TransactionContainsTagsPredicate(Collections.singletonList("Alice"));
assertTrue(predicate.test(new TransactionBuilder().withTags("Alice", "Bob").build()));

// Multiple keywords
Expand Down

0 comments on commit 473be38

Please sign in to comment.