I want to use the Flex Unit 4 Suite.
I don't really have any experience with unit testing.
I downloaded the Turnkey project but I was a little overwhelmed.
I basically just want to start by creating a simple hello world unit test.
if I have a class called MyClass
with 2 methods square()
and cube()
.
and I want to create a unit test like so:
public class MyTest
{
public function testMyClass():void
{
var myClass:MyClass = new MyClass();
assert(myClass.square(7) == 49);
assert(myClass.cube(7) == 343);
assert(myClass.square(5) == 50); // should fail
}
}
How can I get this to work?