MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Bedienungsanleitung Seite 103

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 124
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 102
TUTORIALS POINT
Simply Easy Learning Page 98
FlexUnit Integration Example
Now Let us follow the following steps to test FlexUnit Integration in a Flex application:
Step
Description
1
Create a project with a name HelloWorld under a package com.tutorialspoint.client as explained in
the Flex - Create Application chapter.
2
Modify HelloWorld.mxml as explained below. Keep rest of the files unchanged.
3
Create TestClass1.as test case as described above and Modify TestClass1.as as explained below.
4
Compile and run the application to make sure business logic is working as per the requirements.
Following is the content of the modified as file src/com.tutorialspoint/client/TestClass1.as.
package com.tutorialspoint.client
{
import org.flexunit.asserts.assertEquals;
public class TestClass1
{
private var counter: int = 1;
[Before]
public function setUp():void
{
//this code will run before every test case execution
}
[After]
public function tearDown():void
{
//this code will run after every test case execution
}
[BeforeClass]
public static function setUpBeforeClass():void
{
//this code will run once when test cases start execution
}
[AfterClass]
public static function tearDownAfterClass():void
{
//this code will run once when test cases ends execution
}
[Test]
public function testCounter():void {
assertEquals(counter, 1);
}
Seitenansicht 102
1 2 ... 98 99 100 101 102 103 104 105 106 107 108 ... 123 124

Kommentare zu diesen Handbüchern

Keine Kommentare