Community
Participate
Working Groups
3.1M6. Start with this unit test: package org.eclipseguide; import junit.framework.TestCase; public class FuzzyTest extends TestCase { void testFuzzyEq() { } } Inside the function start typing "asserttr". Hit Ctrl-Space, first proposal is assertTrue(boolean). Hit return to accept. Type variable name "condition", tab, semicolon. You should now have: void testFuzzyEq() { assertTrue(condition); } with a red squiggle under "condition". Press Ctrl+1, accept quick fix "Create local variable 'condition'". Now you have: void testFuzzyEq() { String condition; assertTrue(condition); } which is a syntax error because there is no assertTrue(String) method. It should have created a boolean variable instead.
If you want another test case try: assertEquals(true, condition); Quick-fix creates this local variable: Object condition; which makes another syntax error because there is no assertEquals(boolean, Object) method. If it matters, I do have the java source attachment properly configured for junit.jar.
*** This bug has been marked as a duplicate of 69471 ***