diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/CagesTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/CagesTest.java index ac2abd4b57..0a38b1a5d7 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/CagesTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/CagesTest.java @@ -27,7 +27,6 @@ */ package EOorg.EOeolang; -import org.eolang.AtCompositeTest; import org.eolang.Data; import org.eolang.ExFailure; import org.eolang.PhFake; @@ -48,7 +47,7 @@ void initializesObjectForTheFirstTime() { final int locator = Cages.INSTANCE.init(phi); Assertions.assertDoesNotThrow( () -> Cages.INSTANCE.get(locator), - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get() + "We expect the first time initialization will be done" ); } @@ -58,7 +57,7 @@ void rencagesTheSameObject() { Cages.INSTANCE.init(phi); Assertions.assertDoesNotThrow( () -> Cages.INSTANCE.init(phi), - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get() + "We expect the reinitialization will be done" ); } @@ -69,7 +68,7 @@ void encagesObjectWithLocator() { final int locator = Cages.INSTANCE.init(first); Cages.INSTANCE.encage(locator, second); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the encage with locator will be done", Cages.INSTANCE.get(locator).hashCode(), Matchers.equalTo(second.hashCode()) ); @@ -81,17 +80,17 @@ void failsToEncageObjectIfIsWasInitialized() { Assertions.assertThrows( ExFailure.class, () -> Cages.INSTANCE.encage(phi.hashCode(), phi), - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get() + "We expect the encage when object was initialized will be done" ); } @Test - void failsToEncageObjectOfDifferentForma() { + void failsToEncageObjectOfDifferentFormat() { final int locator = Cages.INSTANCE.init(new PhFake()); Assertions.assertThrows( ExFailure.class, () -> Cages.INSTANCE.encage(locator, new Data.ToPhi(5L)), - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get() + "We expect the encage with object of different format will be done" ); } @@ -100,7 +99,7 @@ void failsToGetObjectIfWasNotInitialized() { Assertions.assertThrows( ExFailure.class, () -> Cages.INSTANCE.get(new PhFake().hashCode()), - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get() + "We expect that getting of not initialization object will be done" ); } } diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOas_phiTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOas_phiTest.java index 0a88c9038a..06b026043e 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOas_phiTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOas_phiTest.java @@ -27,11 +27,9 @@ */ package EOorg.EOeolang; -import org.eolang.AtCompositeTest; import org.eolang.Data; import org.eolang.Dataized; import org.eolang.PhWith; -import org.eolang.Phi; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.junit.jupiter.api.Test; @@ -47,7 +45,7 @@ final class EOas_phiTest { @Test void printsAndReturns() { MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect that print will be done", new Dataized( new PhWith( new EOas_phi(), diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EObytesEOconcatTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EObytesEOconcatTest.java index 738e8ef521..e44f0264b3 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EObytesEOconcatTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EObytesEOconcatTest.java @@ -27,7 +27,6 @@ */ package EOorg.EOeolang; -import org.eolang.AtCompositeTest; import org.eolang.Data; import org.eolang.Dataized; import org.eolang.PhMethod; @@ -58,7 +57,7 @@ void concatenatesBytes() { "as-string" ); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the bytes concat will be done", new Dataized(phi).take(String.class), Matchers.equalTo("привет mr. ㄤㄠ!") ); diff --git a/eo-runtime/src/test/java/EOorg/EOeolang/EOcageTest.java b/eo-runtime/src/test/java/EOorg/EOeolang/EOcageTest.java index 197afc811a..17d3ca98e5 100644 --- a/eo-runtime/src/test/java/EOorg/EOeolang/EOcageTest.java +++ b/eo-runtime/src/test/java/EOorg/EOeolang/EOcageTest.java @@ -32,7 +32,6 @@ import org.cactoos.Scalar; import org.cactoos.experimental.Threads; import org.cactoos.number.SumOf; -import org.eolang.AtCompositeTest; import org.eolang.AtVoid; import org.eolang.Atom; import org.eolang.Data; @@ -64,7 +63,7 @@ final class EOcageTest { void encagesViaApplication() { final Phi cage = EOcageTest.encaged(new Data.ToPhi(1L)); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the encage via application will be done", new Dataized(cage).take(Long.class), Matchers.equalTo(1L) ); @@ -75,7 +74,7 @@ void encagesAndFrees() { final Phi cage = EOcageTest.encaged(new Data.ToPhi(1L)); EOcageTest.encageTo(cage, new Data.ToPhi(2L)); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the encage and free afterwards will be done", new Dataized(cage).take(Long.class), Matchers.equalTo(2L) ); @@ -90,7 +89,7 @@ void overwritesCagedObject() { ) ); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the encage will be done", new Dataized(new PhMethod(cage, "x")).take(Long.class), Matchers.equalTo(1L) ); @@ -102,7 +101,7 @@ void overwritesCagedObject() { ) ); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the overwrite of object will be done", new Dataized(new PhMethod(cage, "x")).take(Long.class), Matchers.equalTo(2L) ); @@ -114,7 +113,7 @@ void encagesObjectOnCopy() { final Phi second = first.copy(); EOcageTest.encageTo(second, new Data.ToPhi(2L)); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the encage of object for copying will be done", new Dataized(first).take(Long.class), Matchers.equalTo(2L) ); @@ -124,13 +123,13 @@ void encagesObjectOnCopy() { void writesAndRewritesPrimitive() { final Phi cage = EOcageTest.encaged(new Data.ToPhi(1L)); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the writing of primitive will be done", new Dataized(cage).take(Long.class), Matchers.equalTo(1L) ); EOcageTest.encageTo(cage, new Data.ToPhi(5L)); MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "We expect the rewriting of primitive will be done", new Dataized(cage).take(Long.class), Matchers.equalTo(5L) ); @@ -142,7 +141,7 @@ void doesNotWritePrimitivesFormedDifferently() { Assertions.assertThrows( EOerror.ExError.class, () -> EOcageTest.encageTo(cage, new Data.ToPhi("Hello world")), - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get() + "We expect the writing of formed differently primitive will be done" ); } @@ -158,7 +157,7 @@ void doesNotWriteBoundedMethod() { Assertions.assertThrows( EOerror.ExError.class, () -> EOcageTest.encageTo(cage, ten), - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get() + "We expect the writing of bounded method will be done" ); } @@ -170,7 +169,7 @@ void writesBoundedCopyOfTheSameBase() { EOcageTest.encaged(dummy), new PhWith(new PhCopy(dummy), "x", new Data.ToPhi("Hello world")) ), - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get() + "We expect the writing of bounded copy of different base will be done" ); } @@ -230,7 +229,7 @@ void doesNotThrowIfDataizesConcurrently() { ); final int threads = 500; MatcherAssert.assertThat( - AtCompositeTest.FAILED_ASSERT_MESSAGE_SUPPLIER.get(), + "Dataizes concurrent threads failed", new SumOf( new Threads<>( threads,