This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package asx.array { | |
/** | |
* Preserves unique values in an Array, removes any duplicate values. | |
* | |
* @param array Array from which to remove duplicates | |
* @return Array of unique items | |
* @example | |
* <listing version="3.0"> | |
* var values:Array = [1, 1, 1, 2, 3, 5, 5, 8]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Test(async)] | |
public function asyncExample():void { | |
var target:EventDispatcher = new EventDispatcher(); | |
Async.proceedOnEvent(this, target, Event.COMPLETE, 5000); | |
setTimeout(function() { | |
target.dispatchEvent(new Event(Event.COMPLETE)); | |
}, 1000); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package mockolate | |
{ | |
import flash.display.MovieClip; | |
import flash.events.Event; | |
import org.flexunit.assertThat; | |
import org.flexunit.async.Async; | |
import org.hamcrest.core.not; | |
import org.hamcrest.object.isFalse; | |
import org.hamcrest.object.isTrue; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// creating manually | |
package | |
{ | |
public class ManualMockolates | |
{ | |
public var thing:Thing; | |
[Before(async, timeout=5000)] | |
public function prepareMockolates():void | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class EventRuleExamples | |
{ | |
[Rule] | |
public var expectEvent:EventRule = new EventRule(); | |
[Rule] | |
public var expectOrderedEvent:EventRule = new EventRule(/*ordered = */ true); | |
public var dispatcher:IEventDispatcher; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// IMediaRenderer.as | |
package example | |
{ | |
public interface IMediaRenderer extends IDataRenderer, IUsesResources, IUsesPermissions | |
{ | |
} | |
} | |
// MediaRenderer.as | |
package example |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package asx.string | |
{ | |
public class ColorizeTest | |
{ | |
var colors:Object = { red: red, green: green, yellow: yellow, blue: blue, purple: purple, cyan: cyan, gray: gray }; | |
[Test] | |
public function colorize_shouldReturnColorizedString():void | |
{ | |
for (var color:String in colors) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mockolate.bytecode | |
{ | |
import flash.events.Event; | |
import mx.core.FlexGlobals; | |
import org.as3commons.bytecode.proxy.ProxyFactory; | |
import org.as3commons.bytecode.reflect.ByteCodeType; | |
import org.flexunit.async.Async; | |
import org.hamcrest.assertThat; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mockolate.issues | |
{ | |
import flash.external.ExternalInterface; | |
public class JSBridge | |
{ | |
private static var instance:JSBridge; | |
private static var allowInstantionation:Boolean; | |
public static function getInstance():JSBridge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.mockolate.issues | |
{ | |
import flash.events.Event; | |
import flash.events.IEventDispatcher; | |
import mockolate.ingredients.Sequence; | |
import mockolate.runner.MockolateRule; | |
import mockolate.sequence; | |
public class SequencingExample |
OlderNewer