Skip to content

Commit

Permalink
Covering the other primitive types.
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolTomatos committed Sep 6, 2022
1 parent 19f7bf2 commit b502fbf
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ ImmutableSet<AbstractDoubleAssert<?>> testAbstractDoubleAssertIsEqualTo() {
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsEqualToExpected() {
return ImmutableSet.of(assertThat(1.0 == 2.0).isTrue(), assertThat(1.0 != 2.0).isFalse());
return ImmutableSet.of(
assertThat(1.0 == 2.0).isTrue(),
assertThat(1.0 != 2.0).isFalse(),
assertThat((byte) 1 == (byte) 2).isTrue(),
assertThat(1F == 2F).isTrue(),
assertThat(1 == 2).isTrue(),
assertThat(1L == 2L).isTrue(),
assertThat((short) 1 == (short) 2).isTrue());
}

ImmutableSet<AbstractDoubleAssert<?>> testAbstractDoubleAssertIsNotEqualTo() {
Expand All @@ -37,7 +44,14 @@ ImmutableSet<AbstractDoubleAssert<?>> testAbstractDoubleAssertIsNotEqualTo() {
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsNotEqualToExpected() {
return ImmutableSet.of(assertThat(1.0 != 2.0).isTrue(), assertThat(1.0 == 2.0).isFalse());
return ImmutableSet.of(
assertThat(1.0 != 2.0).isTrue(),
assertThat(1.0 == 2.0).isFalse(),
assertThat((byte) 1 != (byte) 2).isTrue(),
assertThat(1F != 2F).isTrue(),
assertThat(1 != 2).isTrue(),
assertThat(1L != 2L).isTrue(),
assertThat((short) 1 != (short) 2).isTrue());
}

AbstractDoubleAssert<?> testAbstractDoubleAssertIsZero() {
Expand All @@ -53,19 +67,47 @@ AbstractDoubleAssert<?> testAbstractDoubleAssertIsOne() {
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsLessThanExpected() {
return ImmutableSet.of(assertThat(1.0 < 2.0).isTrue(), assertThat(1.0 >= 2.0).isFalse());
return ImmutableSet.of(
assertThat(1.0 < 2.0).isTrue(),
assertThat(1.0 >= 2.0).isFalse(),
assertThat(((byte) 1) < ((byte) 2)).isTrue(),
assertThat(1F < 2F).isTrue(),
assertThat(1 < 2).isTrue(),
assertThat(1L < 2L).isTrue(),
assertThat(((short) 1) < ((short) 2)).isTrue());
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsLessThanOrEqualToExpected() {
return ImmutableSet.of(assertThat(1.0 <= 2.0).isTrue(), assertThat(1.0 > 2.0).isFalse());
return ImmutableSet.of(
assertThat(1.0 <= 2.0).isTrue(),
assertThat(1.0 > 2.0).isFalse(),
assertThat(((byte) 1) <= ((byte) 2)).isTrue(),
assertThat(1F <= 2F).isTrue(),
assertThat(1 <= 2).isTrue(),
assertThat(1L <= 2L).isTrue(),
assertThat(((short) 1) <= ((short) 2)).isTrue());
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsGreaterThanExpected() {
return ImmutableSet.of(assertThat(1.0 > 2.0).isTrue(), assertThat(1.0 <= 2.0).isFalse());
return ImmutableSet.of(
assertThat(1.0 > 2.0).isTrue(),
assertThat(1.0 <= 2.0).isFalse(),
assertThat(((byte) 1) > ((byte) 2)).isTrue(),
assertThat(1F > 2F).isTrue(),
assertThat(1 > 2).isTrue(),
assertThat(1L > 2L).isTrue(),
assertThat(((short) 1) > ((short) 2)).isTrue());
}

ImmutableSet<AbstractAssert<?, ?>>
testAbstractDoubleAssertActualIsGreaterThanOrEqualToExpected() {
return ImmutableSet.of(assertThat(1.0 >= 2.0).isTrue(), assertThat(1.0 < 2.0).isFalse());
return ImmutableSet.of(
assertThat(1.0 >= 2.0).isTrue(),
assertThat(1.0 < 2.0).isFalse(),
assertThat(((byte) 1) >= ((byte) 2)).isTrue(),
assertThat(1F >= 2F).isTrue(),
assertThat(1 >= 2).isTrue(),
assertThat(1L >= 2L).isTrue(),
assertThat(((short) 1) >= ((short) 2)).isTrue());
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,29 @@ ImmutableSet<AbstractDoubleAssert<?>> testAbstractDoubleAssertIsEqualTo() {
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsEqualToExpected() {
return ImmutableSet.of(assertThat(1.0).isEqualTo(2.0), assertThat(1.0).isEqualTo(2.0));
return ImmutableSet.of(
assertThat(1.0).isEqualTo(2.0),
assertThat(1.0).isEqualTo(2.0),
assertThat((byte) 1).isEqualTo((byte) 2),
assertThat(1F).isEqualTo(2F),
assertThat(1).isEqualTo(2),
assertThat(1L).isEqualTo(2L),
assertThat((short) 1).isEqualTo((short) 2));
}

ImmutableSet<AbstractDoubleAssert<?>> testAbstractDoubleAssertIsNotEqualTo() {
return ImmutableSet.of(assertThat(0.0).isNotEqualTo(1), assertThat(0.0).isNotEqualTo(1));
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsNotEqualToExpected() {
return ImmutableSet.of(assertThat(1.0).isNotEqualTo(2.0), assertThat(1.0).isNotEqualTo(2.0));
return ImmutableSet.of(
assertThat(1.0).isNotEqualTo(2.0),
assertThat(1.0).isNotEqualTo(2.0),
assertThat((byte) 1).isNotEqualTo((byte) 2),
assertThat(1F).isNotEqualTo(2F),
assertThat(1).isNotEqualTo(2),
assertThat(1L).isNotEqualTo(2L),
assertThat((short) 1).isNotEqualTo((short) 2));
}

AbstractDoubleAssert<?> testAbstractDoubleAssertIsZero() {
Expand All @@ -50,21 +64,47 @@ AbstractDoubleAssert<?> testAbstractDoubleAssertIsOne() {
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsLessThanExpected() {
return ImmutableSet.of(assertThat(1.0).isLessThan(2.0), assertThat(1.0).isLessThan(2.0));
return ImmutableSet.of(
assertThat(1.0).isLessThan(2.0),
assertThat(1.0).isLessThan(2.0),
assertThat(((byte) 1)).isLessThan(((byte) 2)),
assertThat(1F).isLessThan(2F),
assertThat(1).isLessThan(2),
assertThat(1L).isLessThan(2L),
assertThat(((short) 1)).isLessThan(((short) 2)));
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsLessThanOrEqualToExpected() {
return ImmutableSet.of(
assertThat(1.0).isLessThanOrEqualTo(2.0), assertThat(1.0).isLessThanOrEqualTo(2.0));
assertThat(1.0).isLessThanOrEqualTo(2.0),
assertThat(1.0).isLessThanOrEqualTo(2.0),
assertThat(((byte) 1)).isLessThanOrEqualTo(((byte) 2)),
assertThat(1F).isLessThanOrEqualTo(2F),
assertThat(1).isLessThanOrEqualTo(2),
assertThat(1L).isLessThanOrEqualTo(2L),
assertThat(((short) 1)).isLessThanOrEqualTo(((short) 2)));
}

ImmutableSet<AbstractAssert<?, ?>> testAbstractDoubleAssertActualIsGreaterThanExpected() {
return ImmutableSet.of(assertThat(1.0).isGreaterThan(2.0), assertThat(1.0).isGreaterThan(2.0));
return ImmutableSet.of(
assertThat(1.0).isGreaterThan(2.0),
assertThat(1.0).isGreaterThan(2.0),
assertThat(((byte) 1)).isGreaterThan(((byte) 2)),
assertThat(1F).isGreaterThan(2F),
assertThat(1).isGreaterThan(2),
assertThat(1L).isGreaterThan(2L),
assertThat(((short) 1)).isGreaterThan(((short) 2)));
}

ImmutableSet<AbstractAssert<?, ?>>
testAbstractDoubleAssertActualIsGreaterThanOrEqualToExpected() {
return ImmutableSet.of(
assertThat(1.0).isGreaterThanOrEqualTo(2.0), assertThat(1.0).isGreaterThanOrEqualTo(2.0));
assertThat(1.0).isGreaterThanOrEqualTo(2.0),
assertThat(1.0).isGreaterThanOrEqualTo(2.0),
assertThat(((byte) 1)).isGreaterThanOrEqualTo(((byte) 2)),
assertThat(1F).isGreaterThanOrEqualTo(2F),
assertThat(1).isGreaterThanOrEqualTo(2),
assertThat(1L).isGreaterThanOrEqualTo(2L),
assertThat(((short) 1)).isGreaterThanOrEqualTo(((short) 2)));
}
}

0 comments on commit b502fbf

Please sign in to comment.