-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes to support MightyMock integration into MXUnit
- Loading branch information
1 parent
d8417ea
commit 0efea63
Showing
4 changed files
with
99 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<cfcomponent displayname="MockFactory" output="false"> | ||
|
||
<cffunction name="init"> | ||
<cfscript> | ||
return this; | ||
</cfscript> | ||
</cffunction> | ||
|
||
<cffunction name="createMock"> | ||
<cfargument name="mocked" required="false" default="" /> | ||
<cfargument name="mockType" required="false" default="fast" /> | ||
<cfswitch expression="#arguments.mockType#"> | ||
<cfcase value="fast"> | ||
<cfreturn createObject("component","MightyMock").init(arguments.mocked) /> | ||
</cfcase> | ||
<cfcase value="typeSafe"> | ||
<cfreturn createObject("component","MightyMock").init(arguments.mocked,true) /> | ||
</cfcase> | ||
<cfcase value="partial"> | ||
<cfthrow type="MightyMock.MockFactory.partialMocksNotImplemented" message="Partial mocks are not available via MightyMock yet." /> | ||
</cfcase> | ||
</cfswitch> | ||
</cffunction> | ||
|
||
</cfcomponent> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters