This is a newbie question.
I’d like to do a simple CFC function call for unit testing but I want to call an existing function written in CF Is there such an example?.
For example let’s say I have a CFC file called Sample.cfc in my code base that provides a lookup. It returns a 1 if the argument AccountType=“Business” and a 2 if AccountType=“Consumer” and 0 otherwise. The CFC looks like this:
<cfcomponent displayname=“Sample” ">
I want to call this from a unit test run function so I can do the assertions. How do I do that? What I am looking for is how I get a reference to the Sample component so I can call the EvaluateAccountType function with various arguments and do assertions on what it returns.
Thanks,
Steve