hi all,

  I tried a different approach in my setUp for my testCase.  It's failing
on the call to launcher.bootApplication(...)

protected void setUp() throws Exception {

       ClassLoader cl = getClass().getClassLoader();

       String applicationSCDL = "META-INF/sca/default.scdl";

       URL applicationScdlURL = cl.getResource(applicationSCDL);

       if (applicationScdlURL == null) {
           throw new RuntimeException("application SCDL not found: " +
applicationSCDL);
       }

       LauncherImpl launcher = new LauncherImpl();
       launcher.setApplicationLoader(cl);

       component = launcher.bootApplication("application",
applicationScdlURL);
       component.start();

       context = new CompositeContextImpl(component);
       context.start();

any and all help would be great, johnny



On 9/5/06, Jon Lewis <[EMAIL PROTECTED]> wrote:

hi Jeremy (and all)...

thanks for the feedback.  I tried just using JUnit, but when I make the
call to:

CompositeContext context = CurrentCompositeContext.getContext();

the context is coming back null.  So, I'm assuming I need to do some
setup, but don't know everything I need to setup I guess...

thanks Johnny




On 9/5/06, Jeremy Boynes <[EMAIL PROTECTED]> wrote:
>
> Jon,
>
> For unit testing application code you can use JUnit as normal (or any
> other framework such as TestNG) - perhaps using easymock or an
> alternative to mock out the services the code is using.
>
> If you want to do integration testing you could deploy the
> application to the runtime host and use an external framework such as
> httpunit.
>
> Or are you trying to do something else?
> --
> Jeremy
>
> On Sep 5, 2006, at 2:18 PM, Jon Lewis wrote:
>
> > hi All,
> >
> >   Is there a sample app that uses junit and a test case.   I've
> > looked at
> > the code in the repository and it looks like all the samples build
> > on the
> > SCATestCase and that's testing the code base.
> >
> > thanks in advance
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to