|
From: Chris A. <mrc...@gm...> - 2006-05-18 21:06:15
|
Hey Sam,
Okay, so in my current structure I have:
- classes
- asunit/all of their stuff...
- org/
- osflash/
- fling/
- tests/
- TestMovieAsset.as
- assets/
- MovieAsset.as
- build/
- alltests,swf
That's simplified of course. ;-)
So, yeah, if you need to test your class, just use import to get it to
see your class, then use it as you see fit in your TestCase.
Here is an excerpt from my TestMovieAsset class:
mport asunit.framework.TestCase;
import org.osflash.fling.util.assets.MovieAsset;
import com.dynamicflash.utils.Delegate;
import org.osflash.fling.util.assets.AssetLoader;
/**
* @author Chris Allen mrc...@gm...
*/
class org.osflash.fling.tests.TestMovieAsset extends TestCase
{
=09private var className:String =3D "org.osflash.fling.tests.TestMovieAsset=
";
=09
=09private var asset:MovieAsset;
etc...
I hope that helps.
-Chirs
On 5/18/06, Sam <sa...@th...> wrote:
> Just one more question.
> How do you structure you directories?
> I'm having a problem figuring out how to import the classes I want to
> test.
>
> Here's my structure:
>
> flash/
> assets/
> libraries/
> main/
> classes/
> com/
> LuminicBox/
> three60/
> ClassIWantToTest.as
> test/
> asunit/
> build.properties
> build.xml
> MyTestCase.as
> MyTestRunner.as
>
> How do I import ClassIWantToTest.as into MyTestCase.as?
> Can you back out of the current directory with import?
>
>
> On May 18, 2006, at 12:15 PM, Chris Allen wrote:
>
> > On 5/18/06, Sam <sa...@th...> wrote:
> >> Chris,
> >> Thanks alot, your proccess works great. I was just about to give up
> >> on the whole thing, so thanks again.
> >>
> >
> > I'm glad that it worked for you.
> >
|