forked from robotlegs/robotlegs-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
major cleanup of all command related tests
- Loading branch information
Showing
10 changed files
with
298 additions
and
344 deletions.
There are no files selected for viewing
236 changes: 140 additions & 96 deletions
236
test/robotlegs/bender/extensions/commandCenter/impl/CommandExecutorTest.as
Large diffs are not rendered by default.
Oops, something went wrong.
16 changes: 8 additions & 8 deletions
16
...r/support/SelfReportingCallbackCommand.as → .../support/ClassReportingCallbackCommand.as
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
//------------------------------------------------------------------------------ | ||
// Copyright (c) 2011 the original author or authors. All Rights Reserved. | ||
// | ||
// NOTICE: You are permitted to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// Copyright (c) 2009-2013 the original author or authors. All Rights Reserved. | ||
// | ||
// NOTICE: You are permitted to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
//------------------------------------------------------------------------------ | ||
|
||
package robotlegs.bender.extensions.commandCenter.support | ||
{ | ||
|
||
public class SelfReportingCallbackCommand | ||
public class ClassReportingCallbackCommand | ||
{ | ||
|
||
/*============================================================================*/ | ||
/* Public Properties */ | ||
/*============================================================================*/ | ||
|
||
[Inject(name="executeCallback")] | ||
public var callback:Function; | ||
[Inject(name="reportingFunction")] | ||
public var reportingFunc:Function; | ||
|
||
/*============================================================================*/ | ||
/* Public Functions */ | ||
/*============================================================================*/ | ||
|
||
public function execute():void | ||
{ | ||
callback(this); | ||
reportingFunc && reportingFunc(ClassReportingCallbackCommand); | ||
} | ||
} | ||
} |
31 changes: 31 additions & 0 deletions
31
test/robotlegs/bender/extensions/commandCenter/support/ClassReportingCallbackCommand2.as
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//------------------------------------------------------------------------------ | ||
// Copyright (c) 2009-2013 the original author or authors. All Rights Reserved. | ||
// | ||
// NOTICE: You are permitted to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
//------------------------------------------------------------------------------ | ||
|
||
package robotlegs.bender.extensions.commandCenter.support | ||
{ | ||
|
||
public class ClassReportingCallbackCommand2 | ||
{ | ||
|
||
/*============================================================================*/ | ||
/* Public Properties */ | ||
/*============================================================================*/ | ||
|
||
[Inject(name="reportingFunction")] | ||
public var reportingFunc:Function; | ||
|
||
/*============================================================================*/ | ||
/* Public Functions */ | ||
/*============================================================================*/ | ||
|
||
public function execute():void | ||
{ | ||
reportingFunc && reportingFunc(ClassReportingCallbackCommand2); | ||
} | ||
} | ||
|
||
} |
32 changes: 32 additions & 0 deletions
32
test/robotlegs/bender/extensions/commandCenter/support/ClassReportingCallbackGuard.as
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
//------------------------------------------------------------------------------ | ||
// Copyright (c) 2009-2013 the original author or authors. All Rights Reserved. | ||
// | ||
// NOTICE: You are permitted to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
//------------------------------------------------------------------------------ | ||
|
||
package robotlegs.bender.extensions.commandCenter.support | ||
{ | ||
|
||
public class ClassReportingCallbackGuard | ||
{ | ||
|
||
/*============================================================================*/ | ||
/* Public Properties */ | ||
/*============================================================================*/ | ||
|
||
[Inject(name="reportingFunction")] | ||
public var reportingFunc:Function; | ||
|
||
/*============================================================================*/ | ||
/* Public Functions */ | ||
/*============================================================================*/ | ||
|
||
public function approve():Boolean | ||
{ | ||
reportingFunc && reportingFunc(ClassReportingCallbackGuard); | ||
return true | ||
} | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
test/robotlegs/bender/extensions/commandCenter/support/ClassReportingCallbackGuard2.as
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
//------------------------------------------------------------------------------ | ||
// Copyright (c) 2009-2013 the original author or authors. All Rights Reserved. | ||
// | ||
// NOTICE: You are permitted to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
//------------------------------------------------------------------------------ | ||
|
||
package robotlegs.bender.extensions.commandCenter.support | ||
{ | ||
|
||
public class ClassReportingCallbackGuard2 | ||
{ | ||
|
||
/*============================================================================*/ | ||
/* Public Properties */ | ||
/*============================================================================*/ | ||
|
||
[Inject(name="reportingFunction")] | ||
public var reportingFunc:Function; | ||
|
||
/*============================================================================*/ | ||
/* Public Functions */ | ||
/*============================================================================*/ | ||
|
||
public function approve():Boolean | ||
{ | ||
reportingFunc && reportingFunc(ClassReportingCallbackGuard2); | ||
return true | ||
} | ||
} | ||
} |
19 changes: 8 additions & 11 deletions
19
...nter/support/SelfReportingCallbackHook.as → ...ter/support/ClassReportingCallbackHook.as
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,30 @@ | ||
//------------------------------------------------------------------------------ | ||
// Copyright (c) 2011 the original author or authors. All Rights Reserved. | ||
// | ||
// NOTICE: You are permitted to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
// Copyright (c) 2009-2013 the original author or authors. All Rights Reserved. | ||
// | ||
// NOTICE: You are permitted to use, modify, and distribute this file | ||
// in accordance with the terms of the license agreement accompanying it. | ||
//------------------------------------------------------------------------------ | ||
|
||
package robotlegs.bender.extensions.commandCenter.support | ||
{ | ||
|
||
public class SelfReportingCallbackHook | ||
public class ClassReportingCallbackHook | ||
{ | ||
|
||
/*============================================================================*/ | ||
/* Public Properties */ | ||
/*============================================================================*/ | ||
|
||
[Inject] | ||
public var command:SelfReportingCallbackCommand; | ||
|
||
[Inject(name="hookCallback")] | ||
public var callback:Function; | ||
[Inject(name="reportingFunction")] | ||
public var reportingFunc:Function; | ||
|
||
/*============================================================================*/ | ||
/* Public Functions */ | ||
/*============================================================================*/ | ||
|
||
public function hook():void | ||
{ | ||
callback(this); | ||
reportingFunc && reportingFunc(ClassReportingCallbackHook); | ||
} | ||
} | ||
} |
14 changes: 0 additions & 14 deletions
14
test/robotlegs/bender/extensions/commandCenter/support/SelfReportingCallbackCommand2.as
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.