I run a (JFCUnit)-TestCase under Eclipse, after
an assert-statement my testCase terminates, even
if it's not the end of the testCase.
Also is the assert-statement not evalutated.
(I tried a simple assertEquals("a", "b");, but no failure
occurs)
When going into the assert-statement with the Debugger, the assert-statement is evaluated correctly and then the testCase terminates also.
some ideas ....? thanx
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I believe there were some problems with older versions not catching the exceptions properly. What version are you using?
Are you using XML interface to the test cases?
I do not have enough information on your environment to look into this issue.
Kevin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Has anyone a Solution for this Problem?
I have the same Problem as koehnen and find no solution for it. I thought it depends on eclipse, but with eclipse 3.1 the problem occurs, also.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
assertEquals("A","B"), look at the methods, you'll see that the first parameter is a message that can be reported, the second is the evaluation. This comes from the JUnit level.
You want
assertEquals("It failed.", "a".equals("b"));
or "a" == "b"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Use Assert.assertEquals from the JUnit API instead and let us know if that works.
Here is the snippet from JUnit API
static void assertEquals(java.lang.String message, java.lang.String expected, java.lang.String actual)
Asserts that two Strings are equal.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, as i mentioned befor i had a similary problem.
@koehnen:
Did you use the method clearUp from the class TestHelper?
this was my problem. The ClearUp - Method terminates the test. In my case the problem was that i had used in my frame JFrame.EXIT_ON_CLOSE for the defaultcloseoperation. I use now JFrame.DISPOSE_ON_CLOSE and it works.
the class TestHelper use resumeAWT() and as far as i know generates this an error when the frame is closed by System.exit(0).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I run a (JFCUnit)-TestCase under Eclipse, after
an assert-statement my testCase terminates, even
if it's not the end of the testCase.
Also is the assert-statement not evalutated.
(I tried a simple assertEquals("a", "b");, but no failure
occurs)
When going into the assert-statement with the Debugger, the assert-statement is evaluated correctly and then the testCase terminates also.
some ideas ....? thanx
I believe there were some problems with older versions not catching the exceptions properly. What version are you using?
Are you using XML interface to the test cases?
I do not have enough information on your environment to look into this issue.
Kevin
Has anyone a Solution for this Problem?
I have the same Problem as koehnen and find no solution for it. I thought it depends on eclipse, but with eclipse 3.1 the problem occurs, also.
assertEquals("A","B"), look at the methods, you'll see that the first parameter is a message that can be reported, the second is the evaluation. This comes from the JUnit level.
You want
assertEquals("It failed.", "a".equals("b"));
or "a" == "b"
Use Assert.assertEquals from the JUnit API instead and let us know if that works.
Here is the snippet from JUnit API
static void assertEquals(java.lang.String message, java.lang.String expected, java.lang.String actual)
Asserts that two Strings are equal.
Hi, as i mentioned befor i had a similary problem.
@koehnen:
Did you use the method clearUp from the class TestHelper?
this was my problem. The ClearUp - Method terminates the test. In my case the problem was that i had used in my frame JFrame.EXIT_ON_CLOSE for the defaultcloseoperation. I use now JFrame.DISPOSE_ON_CLOSE and it works.
the class TestHelper use resumeAWT() and as far as i know generates this an error when the frame is closed by System.exit(0).