root/coldbox/trunk/testing/tests/cases/plugins/webservicesTest.cfc @ 2103

Revision 2103, 2.2 kB (checked in by lmajano, 4 years ago)

First run of refactorings

Line 
1<!-----------------------------------------------------------------------
2********************************************************************************
3Copyright 2005-2007 ColdBox Framework by Luis Majano and Ortus Solutions, Corp
4www.coldboxframework.com | www.luismajano.com | www.ortussolutions.com
5********************************************************************************
6
7Author      :   Sana Ullah
8Date        :   April 03, 2008
9Description :
10        webservicesTest
11----------------------------------------------------------------------->
12<cfcomponent name="webservicesTest" extends="coldbox.system.testing.BaseMXUnitTest" output="false">
13
14        <cffunction name="setUp" returntype="void" access="public" output="false">
15                <cfscript>
16                //Setup ColdBox Mappings For this Test
17                setAppMapping("/coldbox/testharness");
18                setConfigMapping(ExpandPath(instance.AppMapping & "/config/coldbox.xml.cfm"));
19                //Call the super setup method to setup the app.
20                super.setup();
21                </cfscript>
22        </cffunction>
23       
24        <cffunction name="testPlugin" access="public" returntype="void" output="false">
25                <!--- Now test some events --->
26                <cfscript>
27                        var plugin = getController().getPlugin("webservices");
28
29                        AssertTrue( isObject(plugin) );
30                </cfscript>
31        </cffunction>
32       
33        <cffunction name="testgetWS" access="public" returntype="void" output="false">
34                <!--- Now test getWS method --->
35                <cfscript>
36                        var plugin = getController().getPlugin("webservices");
37                       
38                        AssertEquals(plugin.getWS('AnotherTestWS'),'http://www.coldboxframework.com/distribution/updatews.cfc?wsdl','Returned url is different');                       
39                </cfscript>
40        </cffunction>
41
42        <cffunction name="testgetWSobj" access="public" returntype="void" output="false">
43                <!--- Now test getWSobj method --->
44                <cfscript>
45                        var plugin = getController().getPlugin("webservices");
46                       
47                        assertTrue(IsObject(plugin.getWSobj('AnotherTestWS')),'Returned values is not a object');                       
48                </cfscript>
49        </cffunction>
50       
51        <cffunction name="testgetrefreshWS" access="public" returntype="void" output="false">
52                <!--- Now test refreshWS method --->
53                <cfscript>
54                        var plugin = getController().getPlugin("webservices");
55                       
56                        if(not structKeyExists(server,"railo") ){
57                                plugin.refreshWS('AnotherTestWS');             
58                        }       
59                </cfscript>
60        </cffunction>
61       
62</cfcomponent>
Note: See TracBrowser for help on using the browser.