This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 227314

Summary: JUnit test skeletons - Framework Specification / Custom imports
Product: java Reporter: theshadow27 <theshadow27>
Component: JUnitAssignee: Theofanis Oikonomou <theofanis>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:
Bug Depends on:    
Bug Blocks: 79352    

Description theshadow27 2013-03-11 19:57:21 UTC
per Bug 79352 :
Please describe/specify the skeletons you want to be generated:

Framework Specification / Custom imports. Allow the user to specify which methods are used for assertEquals & assertArrayEquals. For example, to allow hamcrest assertions with custom matchers

Current: skeletons assume that tests are based on org.junit.Assert
Example: 
        import static org.junit.Assert.*;
        ...
        assertEquals(expResult, result);

Enhancement: allow user specification of assertion framework
Example:
        import static org.hamcrest.MatcherAssert.*;
        import static org.hamcrest.Matchers.*;
        ... 
        assertThat(result, is(equalTo(expResult)));

Components: 
   (a) allow specification of static imports  
   (b) allow user to override generation of the assertEquals, assertArrayEquals, etc statements