In the class I am testing, there are a few assert statements that check for various conditions.
One of the methods is
GetNames(string id){
assert(! id.Equals("")); // Causes all junit tests to stop
...
}
and there is an assert statement to check if id is not blank.
In my unit tests, I have one test where I pass it a blank string, and a few others. The problem is that when the assert statement gets executed in the class, the JUnit tests stop running after that test case.
How can I change/setup the unit tests so that if there is an assertion failure in the class, the tests do not stop.
I have to enable the assertions in order for the code to run properly since there are cases where variables are incremented in the assertions. Unfortunately, I cannot change any of the code.
I am using the JUnit plugin in eclipse. I do not have any code in the setup and teardown sections.