Skip to content

Commit

Permalink
Merge branch '__rultor'
Browse files Browse the repository at this point in the history
  • Loading branch information
rultor committed May 8, 2024
2 parents 5e662df + 5b1f54a commit 2f0d2e7
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions eo-runtime/src/test/java/org/eolang/DataizedTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,16 @@
import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

/**
* Test case for {@link Dataized}.
*
* @since 0.22
* @todo #2931:30min Enable the disabled tests. The tests were disabled after \rho attribute
* became immutable. Need to find out what's going on and resolve the tests.
*/
final class DataizedTest {

@Test
@Disabled
void logsCorrectly() {
final Logger log = Logger.getLogger("logsCorrectly");
final Level before = log.getLevel();
Expand All @@ -58,7 +54,7 @@ void logsCorrectly() {
log.setLevel(before);
log.removeHandler(hnd);
MatcherAssert.assertThat(
AtCompositeTest.TO_ADD_MESSAGE,
"Expected correct logs for object dataization",
logs.get(0).getMessage(),
Matchers.allOf(
Matchers.containsString("intν"),
Expand All @@ -68,7 +64,6 @@ void logsCorrectly() {
}

@Test
@Disabled
void logsWhenException() {
final Logger log = Logger.getLogger("logsWhenException");
final Level before = log.getLevel();
Expand All @@ -79,16 +74,16 @@ void logsWhenException() {
final Phi wrong = new PhIncorrect(Phi.Φ);
IntStream.range(0, 5).forEach(
i -> Assertions.assertThrows(
IllegalStateException.class,
ExFailure.class,
() -> new Dataized(wrong).take(),
AtCompositeTest.TO_ADD_MESSAGE
"Expected failure with ExFailure exception on incorrect object dataization"
)
);
new Dataized(new Data.ToPhi(1L), log).take();
log.setLevel(before);
log.removeHandler(hnd);
MatcherAssert.assertThat(
AtCompositeTest.TO_ADD_MESSAGE,
"Expected correct logs for object dataization",
logs.get(0).getMessage(),
Matchers.allOf(
Matchers.containsString("intν"),
Expand Down

1 comment on commit 2f0d2e7

@0pdd
Copy link

@0pdd 0pdd commented on 2f0d2e7 May 8, 2024

Choose a reason for hiding this comment

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

Puzzle 2931-0831d4d9 disappeared from eo-runtime/src/test/java/org/eolang/DataizedTest.java), that's why I closed #2978. Please, remember that the puzzle was not necessarily removed in this particular commit. Maybe it happened earlier, but we discovered this fact only now.

Please sign in to comment.