Skip to content

Commit

Permalink
(#207) Rename IsNumber to NumberIs
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoss committed Nov 15, 2020
1 parent e8f3fcb commit a89854e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@
*
* @since 1.0.0
*/
public final class IsNumber extends MatcherEnvelope<Number> {
public final class NumberIs extends MatcherEnvelope<Number> {

/**
* Ctor.
* @param expected The expected value
*/
public IsNumber(final Number expected) {
public NumberIs(final Number expected) {
super(
new MatcherOf<>(
expected,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,18 @@
import org.junit.jupiter.api.Test;

/**
* Test case for {@link IsNumber}.
* Test case for {@link NumberIs}.
*
* @since 1.0.0
* @checkstyle MagicNumberCheck (500 lines)
*/
final class IsNumberTest {
final class NumberIsTest {

@Test
void matchesDouble() {
new Assertion<>(
"must match a double",
new IsNumber(Double.POSITIVE_INFINITY),
new NumberIs(Double.POSITIVE_INFINITY),
new Matches<>(Double.POSITIVE_INFINITY)
).affirm();
}
Expand All @@ -50,7 +50,7 @@ void matchesDouble() {
void mismatchesDouble() {
new Assertion<>(
"must mismatch a double",
new IsNumber(Double.POSITIVE_INFINITY),
new NumberIs(Double.POSITIVE_INFINITY),
new Mismatches<>(
1234,
"equals <Infinity>",
Expand All @@ -63,7 +63,7 @@ void mismatchesDouble() {
void matchesFloat() {
new Assertion<>(
"must match a integer",
new IsNumber(10f),
new NumberIs(10f),
new Matches<>(10f)
).affirm();
}
Expand All @@ -72,7 +72,7 @@ void matchesFloat() {
void matchesLong() {
new Assertion<>(
"must match a long",
new IsNumber(10L),
new NumberIs(10L),
new Matches<>(10L)
).affirm();
}
Expand All @@ -81,7 +81,7 @@ void matchesLong() {
void matchesInteger() {
new Assertion<>(
"must match an integer",
new IsNumber(10),
new NumberIs(10),
new Matches<>(10)
).affirm();
}
Expand All @@ -90,7 +90,7 @@ void matchesInteger() {
void matchesNumber() {
new Assertion<>(
"must match max value via integer",
new IsNumber(12),
new NumberIs(12),
new Matches<>(new MaxOf(12L, 11L))
).affirm();
}
Expand Down

0 comments on commit a89854e

Please sign in to comment.