Invention Grant
- Patent Title: Resilient mock object creation for unit testing
- Patent Title (中): 弹性模拟对象创建用于单元测试
-
Application No.: US13633291Application Date: 2012-10-02
-
Publication No.: US09122805B2Publication Date: 2015-09-01
- Inventor: Timothy J. Baldwin
- Applicant: International Business Machines Corporation
- Applicant Address: US NY Armonk
- Assignee: International Business Machines Corporation
- Current Assignee: International Business Machines Corporation
- Current Assignee Address: US NY Armonk
- Agency: CRGO Law
- Agent Steven M. Greenberg, Esq.
- Main IPC: G06F9/44
- IPC: G06F9/44 ; G06F11/36

Abstract:
Embodiments of the invention provide a method, system and computer program product for fault alerting in mock object supported unit testing. In an embodiment of the invention, a method for fault alerting in mock object supported unit testing is provided. The method includes creating in memory of a computing system an instance a mock object proxying for an object under test by test code and proxying by method name an invocation of a method in the object under test to the mock object. The method also includes determining whether or not a method exists in memory for the mock object corresponding to the method name. Finally, the method includes invoking an exception handler for the mock object outputting error text indicating a non-presence of a method associated with the method name responsive to a method by the method name not existing in the memory for the mock object, but otherwise invoking a method that exists in the memory of the mock object corresponding to the method name.
Public/Granted literature
- US20140095142A1 RESILIENT MOCK OBJECT CREATION FOR UNIT TESTING Public/Granted day:2014-04-03
Information query