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
<cfinterface displayname="iAnswerable" hint="I represent a class that answers a question"> | |
<cffunction name="Answer" returntype="string" access="public" output="false" hint="I answer a question"> | |
<cfargument name="question" type="any" required="true" /> | |
</cffunction> | |
</cfinterface> |
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="SetJobDelegate" returntype="void" output="false"> | |
<cfargument name="JobDelegate" type="com.idl.app.warm.cfobj.Job.JobDelegate" /> | |
<cfset variables.JobDelegate = arguments.JobDelegate /> | |
</cffunction> | |
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
if (contractApproval.getRegionID() != null) { | |
List regionList = service.getRegionList(); | |
for (Iterator it = regionList.iterator(); it.hasNext();) { | |
KeyValuePair keyValuePair = (KeyValuePair) it.next(); | |
String id = keyValuePair.getId(); | |
String desc = keyValuePair.getDescription(); | |
if (id.equalsIgnoreCase(String.valueOf(contractApproval.getRegionID()))) { | |
contractApproval.setRegionName(desc); | |
break; |
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
<cfscript> | |
variables.cfEvernote = ""; | |
variables.classLoader = createObject("component", "resources.JavaLoader"). | |
init(["#expandPath('../lib/mockito-all-1.8.5.jar')#", | |
"#expandPath('../lib/CFEvernote.jar')#", | |
"#expandPath('../lib/libthrift.jar')#", | |
"#expandPath('../lib/evernote-api-1.18.jar')#"]); | |
variables.mockito = variables.classLoader.create("org.mockito.Mockito").init(); |
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="setUp" access="public" output="false" returntype="void"> | |
<cfscript> | |
variables.cfEvernote = createObject("component","com.714studios.cfevernote.CFEvernote"). | |
Init(variables.configArray[1],variables.configArray[2], | |
"sandbox.evernote.com", | |
"http://localhost/cfevernote/callback.cfm" | |
"#ExpandPath('../lib')#"); | |
variables.mockCFEvernote = variables.mockito.mock(variables.classLoader.create("com.sudios714.cfevernote.CFEvernote"). | |
Init("123","S1","232","sandbox.evernote.com","mock").getClass()); |
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(""); |
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="setClassLoader" returntype="void" access="private" output="false" hint="I put this objects classloader into the metadata its only created once" > | |
<cfargument name="libs" type="array" required="true"> | |
<cfscript> | |
//class loader doesn't exist yet | |
if(!structKeyExists(getMetaData(this),"classLoader")) | |
getMetaData(this).classLoader = createObject("component", "JavaLoader").init(arguments.libs); | |
instance.classLoader = getMetaData(this).classLoader; | |
</cfscript> | |
</cffunction> |
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
<!--- Tests ---> | |
<cffunction name="testValidateValidXMLReturnsTrue" returntype="void" access="public" output="false" hint="I validate XML" > | |
<cfscript> | |
var expected = true; | |
var actual = ""; | |
var content = '<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"><en-note><b>Hello World</b></en-note>'; | |
var note = mock("com.714studios.cfevernote.Note","typeSafe"); | |
note.getContent().returns(content); |
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
module("About Asserts (topics/about_asserts.js)"); | |
test("ok", function() { | |
ok(false, 'what will satisfy the ok assertion?'); | |
}); | |
test("not", function() { | |
not(__, 'what is a false value?'); | |
}); |
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
<cfscript> | |
teams = ["Airmen", | |
"CF Knights", | |
"Fighting Amish", | |
"Slypigs", | |
"Code Assassins", | |
"DoWorkSon", | |
"Vox Pop Cabal", | |
"CFDestructors", | |
"Springfield Isotopes", |
OlderNewer