Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed Sep 13, 2020
2 parents ebab160 + 5bc560a commit 171c9ae
Show file tree
Hide file tree
Showing 180 changed files with 1,070 additions and 1,071 deletions.
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,9 @@ The MIT License (MIT)
</exclusions>
</dependency>
<!--
@todo #1411:30min Migrate existing tests to JUnit 5. It mainly means
changing the imports and move from Ignore to Disabled annotation as
well as replace rules with corresponding annotations. Once this is done
remove the dependencies below.
@todo #1416:30min Migrate the rest of tests to JUnit 5 Junit 4 Rule
should be replaced with a Jupiter counterpart. `@Text(expected=..)`
with `Throws`. After that remove this dependencies.
-->
<dependency>
<groupId>org.junit.vintage</groupId>
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/org/cactoos/ScalarTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
package org.cactoos;

import org.cactoos.scalar.NoNulls;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.llorllale.cactoos.matchers.Assertion;
import org.llorllale.cactoos.matchers.Throws;

Expand All @@ -33,10 +33,10 @@
* @since 0.11
* @checkstyle JavadocMethodCheck (500 lines)
*/
public final class ScalarTest {
final class ScalarTest {

@Test
public void failForNullArgument() {
void failForNullArgument() {
new Assertion<>(
"Must fail for null argument",
() -> new NoNulls<>(null).value(),
Expand All @@ -48,7 +48,7 @@ public void failForNullArgument() {
}

@Test
public void failForNullResult() {
void failForNullResult() {
new Assertion<>(
"Must fail for null result",
() -> new NoNulls<>(() -> null).value(),
Expand All @@ -60,7 +60,7 @@ public void failForNullResult() {
}

@Test
public void okForNoNulls() throws Exception {
void okForNoNulls() throws Exception {
new NoNulls<>(() -> 1).value();
}
}
10 changes: 5 additions & 5 deletions src/test/java/org/cactoos/TextTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import org.cactoos.text.NoNulls;
import org.cactoos.text.TextOf;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.llorllale.cactoos.matchers.Assertion;
import org.llorllale.cactoos.matchers.TextHasString;
import org.llorllale.cactoos.matchers.Throws;
Expand All @@ -35,10 +35,10 @@
* @since 0.11
* @checkstyle JavadocMethodCheck (500 lines)
*/
public final class TextTest {
final class TextTest {

@Test
public void failForNullArgument() {
void failForNullArgument() {
new Assertion<>(
"Must fail for null argument",
() -> new NoNulls(null).asString(),
Expand All @@ -50,7 +50,7 @@ public void failForNullArgument() {
}

@Test
public void failForNullResult() {
void failForNullResult() {
new Assertion<>(
"Must fail for null result",
() -> new NoNulls(() -> null).asString(),
Expand All @@ -62,7 +62,7 @@ public void failForNullResult() {
}

@Test
public void okForNoNulls() {
void okForNoNulls() {
final String message = "Hello";
new Assertion<>(
"Must work with NoNulls",
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/org/cactoos/bytes/Base64BytesTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.Base64;
import org.cactoos.io.BytesOf;
import org.hamcrest.core.IsEqual;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.llorllale.cactoos.matchers.Assertion;

/**
Expand All @@ -37,10 +37,10 @@
* @checkstyle JavadocMethodCheck (500 lines)
*/
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
public final class Base64BytesTest {
final class Base64BytesTest {

@Test
public void checkDecodeBasicDecoder() throws Exception {
void checkDecodeBasicDecoder() throws Exception {
new Assertion<>(
"Must decode bytes using the Base64 encoding basic scheme",
new Base64Bytes(
Expand All @@ -55,7 +55,7 @@ public void checkDecodeBasicDecoder() throws Exception {
}

@Test
public void checkDecodeUrlDecoder() throws Exception {
void checkDecodeUrlDecoder() throws Exception {
new Assertion<>(
"Must decode bytes using the Base64 encoding url scheme",
new Base64Bytes(
Expand All @@ -70,7 +70,7 @@ public void checkDecodeUrlDecoder() throws Exception {
}

@Test
public void checkDecodeMimeDecoder() throws Exception {
void checkDecodeMimeDecoder() throws Exception {
new Assertion<>(
"Must decode bytes using the Base64 encoding mime scheme",
new Base64Bytes(
Expand Down
10 changes: 5 additions & 5 deletions src/test/java/org/cactoos/bytes/BytesBase64Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import java.util.Base64;
import org.cactoos.io.BytesOf;
import org.hamcrest.core.IsEqual;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.llorllale.cactoos.matchers.Assertion;

/**
Expand All @@ -36,10 +36,10 @@
* @checkstyle JavadocMethodCheck (500 lines)
*/
@SuppressWarnings("PMD.AvoidDuplicateLiterals")
public final class BytesBase64Test {
final class BytesBase64Test {

@Test
public void checkEncodeBasic() throws Exception {
void checkEncodeBasic() throws Exception {
new Assertion<>(
"Must encode bytes using the Base64 basic encoding scheme",
new BytesBase64(
Expand All @@ -54,7 +54,7 @@ public void checkEncodeBasic() throws Exception {
}

@Test
public void checkEncodeUrl() throws Exception {
void checkEncodeUrl() throws Exception {
new Assertion<>(
"Must encode bytes using the Base64 URL encoding scheme",
new BytesBase64(
Expand All @@ -69,7 +69,7 @@ public void checkEncodeUrl() throws Exception {
}

@Test
public void checkEncodeMime() throws Exception {
void checkEncodeMime() throws Exception {
new Assertion<>(
"Must encode bytes using the Base64 mime encoding scheme",
new BytesBase64(
Expand Down
34 changes: 17 additions & 17 deletions src/test/java/org/cactoos/collection/ImmutableTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import org.cactoos.list.ListOf;
import org.hamcrest.core.IsEqual;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.llorllale.cactoos.matchers.Assertion;
import org.llorllale.cactoos.matchers.HasSize;
import org.llorllale.cactoos.matchers.HasValues;
Expand All @@ -43,7 +43,7 @@
public class ImmutableTest {

@Test
public void size() {
void size() {
new Assertion<>(
"size() must be equals to original",
new Immutable<>(
Expand All @@ -54,7 +54,7 @@ public void size() {
}

@Test
public void isEmpty() {
void isEmpty() {
new Assertion<>(
"isEmpty() must be equals to original",
new Immutable<>(
Expand All @@ -67,7 +67,7 @@ public void isEmpty() {
}

@Test
public void iterator() {
void iterator() {
new Assertion<>(
"iterator() is equal to original",
() -> new Immutable<>(
Expand All @@ -78,7 +78,7 @@ public void iterator() {
}

@Test
public void contains() {
void contains() {
new Assertion<>(
"contains() must be equals to original",
new Immutable<>(
Expand All @@ -91,7 +91,7 @@ public void contains() {
}

@Test
public void toArray() {
void toArray() {
new Assertion<>(
"toArray() must be equals to original",
new Immutable<>(
Expand All @@ -104,7 +104,7 @@ public void toArray() {
}

@Test
public void testToArray() {
void testToArray() {
new Assertion<>(
"toArray(T[]) must be equals to original",
new Immutable<>(
Expand All @@ -117,7 +117,7 @@ public void testToArray() {
}

@Test
public void add() {
void add() {
new Assertion<>(
"add() must throw exception",
() -> new Immutable<>(
Expand All @@ -133,7 +133,7 @@ public void add() {
}

@Test
public void remove() {
void remove() {
new Assertion<>(
"remove() must throw exception",
() -> new Immutable<>(
Expand All @@ -149,7 +149,7 @@ public void remove() {
}

@Test
public void containsAll() {
void containsAll() {
final ListOf<Integer> another = new ListOf<>(3, 4, 5);
new Assertion<>(
"containsAll() must be equals to original",
Expand All @@ -163,7 +163,7 @@ public void containsAll() {
}

@Test
public void addAll() {
void addAll() {
new Assertion<>(
"addAll() must throw exception",
() -> new Immutable<>(
Expand All @@ -179,7 +179,7 @@ public void addAll() {
}

@Test
public void removeAll() {
void removeAll() {
new Assertion<>(
"removeAll() must throw exception",
() -> new Immutable<>(
Expand All @@ -195,7 +195,7 @@ public void removeAll() {
}

@Test
public void retainAll() {
void retainAll() {
new Assertion<>(
"retainAll() must throw exception",
() -> new Immutable<>(
Expand All @@ -211,7 +211,7 @@ public void retainAll() {
}

@Test
public void clear() {
void clear() {
new Assertion<>(
"clear() must throw exception",
() -> {
Expand All @@ -230,7 +230,7 @@ public void clear() {
}

@Test
public void testToString() {
void testToString() {
new Assertion<>(
"toString() must be equals to original",
new Immutable<>(
Expand All @@ -243,7 +243,7 @@ public void testToString() {
}

@Test
public void testHashCode() {
void testHashCode() {
new Assertion<>(
"hashCode() must be equals to original",
new Immutable<>(
Expand All @@ -256,7 +256,7 @@ public void testHashCode() {
}

@Test
public void testEquals() {
void testEquals() {
final ListOf<Integer> another = new ListOf<>(4, 5, 6);
new Assertion<>(
"equals() must be equals to original",
Expand Down
16 changes: 8 additions & 8 deletions src/test/java/org/cactoos/collection/NoNullsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import java.util.ArrayList;
import org.cactoos.list.ListOf;
import org.hamcrest.core.IsEqual;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import org.llorllale.cactoos.matchers.Assertion;
import org.llorllale.cactoos.matchers.IsTrue;
import org.llorllale.cactoos.matchers.Throws;
Expand All @@ -40,10 +40,10 @@
* @checkstyle JavadocMethodCheck (500 lines)
* @checkstyle MagicNumberCheck (500 lines)
*/
public final class NoNullsTest {
final class NoNullsTest {

@Test
public void throwsErrorIfNullInToArray() {
void throwsErrorIfNullInToArray() {
new Assertion<>(
"Must throw exception",
() -> new NoNulls<>(
Expand All @@ -57,7 +57,7 @@ public void throwsErrorIfNullInToArray() {
}

@Test
public void throwsErrorIfNullInToArrayWithArg() {
void throwsErrorIfNullInToArrayWithArg() {
new Assertion<>(
"Must throw exception for the item#1",
() -> new NoNulls<>(
Expand All @@ -71,7 +71,7 @@ public void throwsErrorIfNullInToArrayWithArg() {
}

@Test
public void throwsErrorIfNullInContainsArg() {
void throwsErrorIfNullInContainsArg() {
new Assertion<>(
"Must throw exception for #contains(null)",
() -> new NoNulls<>(
Expand All @@ -85,7 +85,7 @@ public void throwsErrorIfNullInContainsArg() {
}

@Test
public void testSuccessNotNullArg() {
void testSuccessNotNullArg() {
new Assertion<>(
"Must contain not null argument",
new NoNulls<>(
Expand All @@ -96,7 +96,7 @@ public void testSuccessNotNullArg() {
}

@Test
public void testSuccessAddAll() {
void testSuccessAddAll() {
final NoNulls<Integer> nonulls = new NoNulls<>(new ArrayList<>(0));
nonulls.addAll(new ListOf<>(1, 2));
new Assertion<>(
Expand All @@ -109,7 +109,7 @@ public void testSuccessAddAll() {
}

@Test
public void throwsErrorIfNullInAddAll() {
void throwsErrorIfNullInAddAll() {
final NoNulls<Integer> nonulls = new NoNulls<>(new ArrayList<>(0));
new Assertion<>(
"Must throw exception for nullable #addAll() parameter collection",
Expand Down
Loading

2 comments on commit 171c9ae

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 171c9ae Sep 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 1411-445dea43 disappeared from pom.xml, that's why I closed #1416. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

@0pdd
Copy link
Collaborator

@0pdd 0pdd commented on 171c9ae Sep 13, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Puzzle 1416-3379c7cc discovered in pom.xml and submitted as #1453. Please, remember that the puzzle was not necessarily added in this particular commit. Maybe it was added earlier, but we discovered it only now.

Please sign in to comment.