Advertisement
Guest User

Untitled

a guest
Jul 18th, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!-----------------------------------------------------------------------
  2. Author   :  Luis Majano
  3. Date     :  September 25, 2005
  4. Description :
  5.     Unit Tests integration for the ehGeneral Handler.
  6.  
  7. ----------------------------------------------------------------------->
  8. <cfcomponent extends="coldbox.system.testing.BaseTestCase">
  9.    
  10.     <cffunction name="setUp" returntype="void" output="false">
  11.         <cfscript>
  12.         // Call the super setup method to setup the app.
  13.         super.setup();
  14.        
  15.         // Any preparation work will go here for this test.
  16.         </cfscript>
  17.     </cffunction>
  18.    
  19.     <cffunction name="testindex" returntype="void" output="false">
  20.         <cfscript>
  21.         var event = "";
  22.        
  23.         //Place any variables on the form or URL scope to test the handler.
  24.         //URL.name = "luis"
  25.         event = execute("general.index");
  26.        
  27.         debug(event.getCollection());
  28.        
  29.         //Do your asserts below
  30.         assertEquals("Welcome to ColdBox!", event.getValue("welcomeMessage",""), "Failed to assert welcome message");
  31.            
  32.         </cfscript>
  33.     </cffunction>
  34.    
  35. </cfcomponent>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement