File tree Expand file tree Collapse file tree 2 files changed +5
-12
lines changed
liquidjava-verifier/src/test/java/liquidjava/rj_language/opt Expand file tree Collapse file tree 2 files changed +5
-12
lines changed Original file line number Diff line number Diff line change 55import static org .junit .jupiter .api .Assertions .*;
66
77/**
8- * Simple integration test that verifies interaction between the ErrorEmitter
9- * class and the simulated error reporting process. It ensures that error data
10- * is recorded and retrievable without expecting specific internal fields.
8+ * Simple integration test that verifies interaction between the ErrorEmitter class and the simulated error reporting
9+ * process.
1110 */
1211public class TesteIntegracao {
1312
1413 @ Test
1514 void shouldEmitAndRetrieveErrorInfo () {
1615 ErrorEmitter emitter = new ErrorEmitter ();
1716
18- // Simulate adding an error
1917 emitter .addError ("Integration test error" , "FakeFile.java" , 42 );
2018
21- // Verify that the emitter detected an error and has non-null info
2219 assertTrue (emitter .foundError (), "Emitter should register an error" );
2320 assertNotNull (emitter .getFullMessage (), "Full message should not be null" );
2421
25- // File path may not be implemented — only check for no exception
2622 try {
2723 emitter .getFilePath ();
2824 } catch (Exception e ) {
2925 fail ("getFilePath() should not throw an exception" );
3026 }
3127 }
3228}
33-
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ void setup() {
2323
2424 @ Test
2525 void returnNonNullValues () {
26- emitter .addError ("test" , "main.java" , 3 );
26+ emitter .addError ("test" , "main.java" , 1 );
2727 assertNotNull (emitter .getFullMessage ());
2828 assertNotNull (emitter .getTitleMessage ());
2929 assertNotNull (emitter .getErrorStatus ());
@@ -34,10 +34,8 @@ void returnNonNullValues() {
3434 */
3535 @ Test
3636 void addError () {
37- emitter .addError ("Test error" , "File.java" , 42 );
38-
37+ emitter .addError ("Test error" , "Some message" , 1 );
3938 assertTrue (emitter .foundError (), "Emitter should report found error" );
40- assertEquals ("File.java" , emitter .getFilePath ());
41- assertTrue (emitter .getFullMessage ().contains ("Test error" ));
39+ assertTrue (emitter .getFullMessage ().contains ("Some message" ));
4240 }
4341}
You can’t perform that action at this time.
0 commit comments