Skip to content

Commit

Permalink
objectionary#2896: Improved Assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
levBagryansky committed Apr 15, 2024
1 parent be964c4 commit f493abd
Showing 1 changed file with 0 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.yegor256.xsline.Xsline;
import java.nio.file.Path;
import java.util.Arrays;

import org.cactoos.io.ResourceOf;
import org.eolang.maven.log.CaptureLogs;
import org.eolang.maven.log.Logs;
Expand Down Expand Up @@ -85,18 +84,12 @@ void detectsErrorsSuccessfully(
.execute(new FakeMaven.Verify()),
"Program with noname attributes should have failed or error, but it didn't"
);
System.out.println(temp.toString());
final String message = this.getMessage(out, "Errors identified", temp.toString());
System.out.println(message);
MatcherAssert.assertThat(
"Errors message should have program name and error line number",
message,
Matchers.matchesPattern(this.createRegEx(temp, "Errors identified"))
);
Assertions.assertTrue(
message.matches(this.createRegEx(temp, "Errors identified")),
"Errors message should have program name and error line number"
);
}

@Test
Expand Down

0 comments on commit f493abd

Please sign in to comment.