Skip to content

Commit

Permalink
(yegor256#1305) Remove Sorted collection decorator
Browse files Browse the repository at this point in the history
  • Loading branch information
victornoel committed Mar 21, 2020
1 parent 41a409c commit c95eb02
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 172 deletions.
100 changes: 0 additions & 100 deletions src/main/java/org/cactoos/collection/Sorted.java

This file was deleted.

72 changes: 0 additions & 72 deletions src/test/java/org/cactoos/collection/SortedTest.java

This file was deleted.

15 changes: 15 additions & 0 deletions src/test/java/org/cactoos/iterable/SortedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,12 @@

import java.util.Collections;
import java.util.Comparator;
import org.cactoos.list.ListOf;
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.hamcrest.core.IsEqual;
import org.junit.Test;
import org.llorllale.cactoos.matchers.Assertion;

/**
* Test case for {@link Sorted}.
Expand Down Expand Up @@ -76,4 +79,16 @@ public void sortsAnEmptyArray() throws Exception {
);
}

@Test
public void sortsCollection() {
new Assertion<>(
"Must sort elements in collection",
new Sorted<>(
new ListOf<>(
"o", "t", "t", "f"
)
),
new IsEqual<>(new IterableOf<>("f", "o", "t", "t"))
).affirm();
}
}

0 comments on commit c95eb02

Please sign in to comment.