MACROMEDIA FLEX-FLEX ACTIONSCRIPT LANGUAGE Instrukcja Użytkownika Strona 103

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 124
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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);
}
Przeglądanie stron 102
1 2 ... 98 99 100 101 102 103 104 105 106 107 108 ... 123 124

Komentarze do niniejszej Instrukcji

Brak uwag