CircleWalkthrough

From FlexUnit4 Project Documentation
Revision as of 12:04, 17 June 2010 by Bmarshall (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

This Page is Currently Under Construction!

To jump right in to the walkthrough, click here.

Overview

The circle walkthrough provides a step-by-step breakdown with correlative flex project demonstrating all of the major functionality concepts in the FlexUnit 4.x framework, using, in most cases, a custom Circle class in order to teach said functionality. This walkthrough is intended to teach the following concepts in the order listed:

  • Basic Tests
-Test Methods and Test Cases
-Basic Assertions
  • Ignored Tests
  • Hamcrest
-Standard Matchers
  • Expected Errors and Error Handling
  • Before and After
  • Suites
  • Basic Theories
-Theory Methods
-DataPoints
-Theories Runner
  • Complex Theories
-Using Complex Objects as DataPoints
  • External Data Loading
-Loaders and IExternalDependencyLoader
  • Mocks
-Mockolate framework
  • Parameterized Testing
-Parameters
-Parameterized Runner
  • Running Tests From flexunit 1
  • Rules

Assumptions

These walkthroughs assume you are working in FlashBuilder 4. Several of the steps will assume you are working with a minimum FlexUnit version of 4.1 beta. Additionally, some of the steps require you to be building against Flex SDK 4.x and have at least a basic/cursory knowledge of Flex 4 component construction (for the purposes of the example, very basic knowledge).

Setting up the Project in Flash Builder

[Download] the fxp project file and import it as a new Flex Project.

File and Folder Descriptions

  • Step[n].mxml - The main application corresponding to the current step number (n).
  • SampleCircleLayout.mxml - A demonstration application for using the Circle class in CircleLayout, a custom layout. Used in Steps 09 and 10.
  • /assets/ - Contains assets which are used in applications or test cases.
  • /flexUnitTests/ - Contains sub-projects for test classes used in each step.
  • /com/allurent/flexunit2/vfu/ - Contains classes for visual comparison, directly imported from the Visual Flex Unit framework. Used in Step 13.
  • /cases/ - Contains test cases and classes used in Steps 12 and 13 (custom rules).
  • /net/digitalprimates/ - Contains custom classes used for test scenarios.


Download

To Download the Circle Walkthrough Flex Project, click [here].

Personal tools