Created
July 18, 2011 12:33
-
-
Save bittersweetryan/1089375 to your computer and use it in GitHub Desktop.
blog: testjavamock
This file contains hidden or 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
<cffunction name="test..." returntype="void" access="public" output="false" > | |
<cfscript> | |
var notebooks = ""; | |
var expected = 12; | |
var i = 0; | |
var retArray = createObject("Java","java.util.ArrayList"); | |
var actual = ""; | |
for(i = 1; i lte 12; i = i + 1){ | |
retArray.Add(""); | |
} | |
variables.mockito.when(mockCFEvernote.listNotebooks(12)).thenReturn(retArray); | |
notebooks = variables.cfEvernote.getNotebooks(12); | |
actual = arrayLen(notebooks); | |
assertEquals(expected,actual); | |
</cfscript> | |
</cffunction> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment