Skip to content

Commit

Permalink
Issue checkstyle#9142: Migrate to Truth in AtclauseOrderCheckTest
Browse files Browse the repository at this point in the history
  • Loading branch information
shashwatj07 committed May 21, 2021
1 parent df5cda9 commit ae81fb9
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

package com.puppycrawl.tools.checkstyle.checks.javadoc;

import static com.google.common.truth.Truth.assertWithMessage;
import static com.puppycrawl.tools.checkstyle.checks.javadoc.AtclauseOrderCheck.MSG_KEY;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;

import org.junit.jupiter.api.Test;

Expand All @@ -40,16 +40,18 @@ protected String getPackageLocation() {
public void testGetAcceptableTokens() {
final AtclauseOrderCheck checkObj = new AtclauseOrderCheck();
final int[] expected = {TokenTypes.BLOCK_COMMENT_BEGIN};
assertArrayEquals(expected, checkObj.getAcceptableTokens(),
"Default acceptable tokens are invalid");
assertWithMessage("Default acceptable tokens are invalid")
.that(checkObj.getAcceptableTokens())
.isEqualTo(expected);
}

@Test
public void testGetRequiredTokens() {
final AtclauseOrderCheck checkObj = new AtclauseOrderCheck();
final int[] expected = {TokenTypes.BLOCK_COMMENT_BEGIN};
assertArrayEquals(expected, checkObj.getRequiredTokens(),
"Default required tokens are invalid");
assertWithMessage("Default acceptable tokens are invalid")
.that(checkObj.getAcceptableTokens())
.isEqualTo(expected);
}

@Test
Expand Down

0 comments on commit ae81fb9

Please sign in to comment.