没有任何数据可供显示
开源项目社区 | 当前位置 : |
|
www.trustie.net/open_source_projects | 主页 > 开源项目社区 > jsynthesis |
jsynthesis
|
0 | 0 | 19 |
贡献者 | 讨论 | 代码提交 |
JSynthesisHave you ever used mocks in your unit tests and been very happy about what you have done until, rather late in the day, you discover that you haven't tested the concrete implementations of the classes you have mocked out anywhere and one of the methods just throws a NotImplementedException?
JSynthesis aims make such mistakes a thing of the past by verifying that all the methods called on mock objects have concrete implementations which HAVE been tested.
See the GettingStarted page for brief instructions on how to get the JSynthesis sample project up and running.
Current FunctionalityThe core capability of checking that a concrete method with the same signature is executed for every mocked method that is executed is implemented and working fine for both the currently supported mocking frameworks.
Work to support (optional) validation of the data passed in parameters and return values is very new and disabled by default. The aim of this work is to be able to say not only "I know that every mocked method I've used is backed up be a real method that has been tested" but that "I know that everywhere I've used a mocked method it's being used with parameters that are known to have been tested and it's returning the correct value for those parameters". A high degree of customisation is supported via either traditional Java classes or snippets of Groovy which can be put straight into the properties file.
See ConfigurationOptions for details of how to enable this functionality.
Supported FrameworksJSynthesis currently supports the following Mock Object frameworks:
JMock 1.1 EasyMock 2.3
JSynthesis currently supports the following ways of running tests:
JUnit through Ant 1.7.0 - via the jsynthesis task. JUnit 4.4 JUnitCore runner on the command line, via the JSynthesis batch file. JUnit 3.8.1 TextRunner on the command line, via the JSynthesis batch file.