Skip to content

Commit fca7e0f

Browse files
committed
Re-factored naming/locations...
1 parent ce7fc28 commit fca7e0f

27 files changed

+102
-42
lines changed

src/org/mvcexpress/core/CommandMap.as

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import org.mvcexpress.core.namespace.pureLegsCore;
99
import org.mvcexpress.mvc.Command;
1010
import org.mvcexpress.MvcExpress;
1111
import org.mvcexpress.utils.checkClassSuperclass;
12-
import suites.testObjects.external.ExternalRemoteCommand;
1312

1413
/**
1514
* Handles command mappings, and executes them on messages

test/MvcExpressTestRunner.as

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package {
22
import flash.display.Sprite;
3+
import flash.display.Stage;
34
import flash.display.StageAlign;
45
import flash.display.StageScaleMode;
56
import noiseandheat.flexunit.visuallistener.VisualListener;
@@ -16,7 +17,12 @@ import suites.AllTestSuites;
1617
public class MvcExpressTestRunner extends Sprite {
1718
private var listener:VisualListener;
1819

19-
public function MvcExpressTestRunner(){
20+
static public var stage:Stage;
21+
22+
public function MvcExpressTestRunner() {
23+
24+
MvcExpressTestRunner.stage = this.stage;
25+
2026
var core:FlexUnitCore = new FlexUnitCore();
2127

2228
this.stage.align = StageAlign.TOP_LEFT;

test/suites/AllTestSuites.as

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package suites {
22
import suites.commandMap.CommandMapTests;
33
import suites.fatureGetProxy.FeatureGetProxyTests;
4+
import suites.general.GeneralTests;
45
import suites.mediatorMap.MediatorMapTests;
56
import suites.mediators.MediatorTests;
67
import suites.messenger.MessengerTests;
@@ -20,6 +21,9 @@ import suites.utils.UtilsTests;
2021
public class AllTestSuites {
2122

2223
//*
24+
25+
public var generalTests:GeneralTests;
26+
2327
public var messengerTests:MessengerTests;
2428

2529
public var proxyMapTests:ProxyMapTests;
@@ -34,15 +38,15 @@ public class AllTestSuites {
3438

3539
//public var proxyTests:ProxyTests;
3640

37-
public var mediatorTests:MediatorTests;
38-
3941
public var modularTests:ModularTests;
4042

4143
public var utilsTests:UtilsTests;
4244

4345
public var featureGetProxyTest:FeatureGetProxyTests;
44-
46+
4547
//*/
48+
49+
public var mediatorTests:MediatorTests;
4650

4751
//
4852
//

test/suites/fatureGetProxy/FeatureGetProxyTests.as

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
package suites.fatureGetProxy {
22
import flexunit.framework.Assert;
3-
import suites.testObjects.external.ExternalModule;
4-
import suites.testObjects.main.MainModule;
5-
import suites.testObjects.module.ISimpleTestProxy;
6-
import suites.testObjects.module.SimpleTestProxy;
3+
import suites.testObjects.model.ISimpleTestProxy;
4+
import suites.testObjects.model.SimpleTestProxy;
5+
import suites.testObjects.moduleMain.MainModule;
76

87
/**
98
* COMMENT
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
package suites.general {
2+
import org.flexunit.Assert;
3+
import org.mvcexpress.mvc.Proxy;
4+
import org.mvcexpress.MvcExpress;
5+
import suites.featureProxyHost.testObjects.HostTestModuleSprite;
6+
import suites.featureProxyHost.testObjects.localObjects.HostProxy;
7+
import suites.featureProxyHost.testObjects.localObjects.HostProxySubclass;
8+
import suites.featureProxyHost.testObjects.localObjects.LocalProxyWithGlobalInjection;
9+
import suites.featureProxyHost.testObjects.localObjects.LocalProxyWithLocalInjection;
10+
import suites.featureProxyHost.testObjects.remoteModule.RemoteModule;
11+
12+
/**
13+
* COMMENT
14+
* @author Raimundas Banevicius (http://www.mindscriptact.com/)
15+
*/
16+
public class GeneralTests {
17+
18+
[Before]
19+
20+
public function runBeforeEveryTest():void {
21+
}
22+
23+
[After]
24+
25+
public function runAfterEveryTest():void {
26+
}
27+
28+
[Test(description="Version Test")]
29+
30+
public function general_framework_version():void {
31+
Assert.assertEquals("Version must be defined using 3 numbers, separated by dots.", MvcExpress.VERSION.split(".").length, 3);
32+
}
33+
34+
[Test(description="Debug flag Test")]
35+
36+
public function general_debug_flag():void {
37+
CONFIG::debug {
38+
Assert.assertTrue("While compiling in debug - MvcExpress.DEBUG_COMPILE must be true.", MvcExpress.DEBUG_COMPILE);
39+
return;
40+
}
41+
Assert.assertFalse("While compiling in debug - MvcExpress.DEBUG_COMPILE must be false.", MvcExpress.DEBUG_COMPILE);
42+
}
43+
44+
}
45+
}

test/suites/mediatorMap/MediatorMapTests.as

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import org.mvcexpress.mvc.Mediator;
1010
import org.mvcexpress.core.namespace.pureLegsCore;
1111
import suites.mediatorMap.medatorMaptestObj.MediatorMapTestSprite;
1212
import suites.mediatorMap.medatorMaptestObj.MediatorMapTestSpriteMediator;
13-
import suites.mediators.mediatorObj.MediatorSprite;
14-
import suites.mediators.mediatorObj.MediatorSpriteMediator;
13+
import suites.testObjects.view.MediatorSprite;
14+
import suites.testObjects.view.MediatorSpriteMediator;
1515
import utils.AsyncUtil;
1616

1717
/**

test/suites/mediators/MediatorTests.as

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
package suites.mediators {
22
import flexunit.framework.Assert;
33
import org.mvcexpress.core.MediatorMap;
4-
import org.mvcexpress.core.ModuleManager;
5-
import org.mvcexpress.core.ProxyMap;
64
import org.mvcexpress.core.messenger.Messenger;
75
import org.mvcexpress.core.namespace.pureLegsCore;
8-
import suites.mediators.mediatorObj.MediatorSprite;
9-
import suites.mediators.mediatorObj.MediatorSpriteMediator;
6+
import org.mvcexpress.core.ProxyMap;
7+
import suites.testObjects.view.MediatorSprite;
8+
import suites.testObjects.view.MediatorSpriteMediator;
109

1110
/**
1211
* COMMENT
@@ -48,7 +47,16 @@ public class MediatorTests {
4847

4948
[Test(expects="Error")]
5049

51-
public function test_empty_handler():void {
50+
public function mediator_constructor_fails():void {
51+
new MediatorSpriteMediator();
52+
}
53+
54+
55+
56+
57+
[Test(expects="Error")]
58+
59+
public function mediator_empty_handler():void {
5260
if (CONFIG::debug == true) {
5361
messenger.send("test_add_empty_handler");
5462
} else {
@@ -58,31 +66,31 @@ public class MediatorTests {
5866

5967
[Test]
6068

61-
public function test_handler_object_params():void {
69+
public function mediator_handler_object_params():void {
6270
messenger.send("test_handler_object_params");
6371
}
6472

6573
[Test]
6674

67-
public function test_handler_bad_params():void {
75+
public function mediator_handler_bad_params():void {
6876
messenger.send("test_handler_bad_params");
6977
}
7078

7179
[Test(expects="Error")]
7280

73-
public function test_handler_two_params():void {
81+
public function mediator_handler_two_params():void {
7482
messenger.send("test_handler_two_params");
7583
}
7684

7785
[Test]
7886

79-
public function test_handler_two_params_one_optional():void {
87+
public function mediator_handler_two_params_one_optional():void {
8088
messenger.send("test_handler_two_params_one_optional");
8189
}
8290

8391
[Test]
8492

85-
public function test_same_handler_added_twice_fails():void {
93+
public function mediator_same_handler_added_twice_fails():void {
8694
if (CONFIG::debug == true) {
8795
try {
8896
testView.tryAddingHandlerTwice();

test/suites/testObjects/controller/GetProxyTestCommand.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package suites.testObjects.controller {
22
import org.mvcexpress.mvc.Command;
3-
import suites.testObjects.main.MainDataProxy;
3+
import suites.testObjects.moduleMain.MainDataProxy;
44

55
/**
66
* TODO:CLASS COMMENT

test/suites/testObjects/module/ExtendedSimpleTestProxy.as renamed to test/suites/testObjects/model/ExtendedSimpleTestProxy.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package suites.testObjects.module {
1+
package suites.testObjects.model {
22

33
/**
44
* COMMENT

test/suites/testObjects/module/ISimpleTestProxy.as renamed to test/suites/testObjects/model/ISimpleTestProxy.as

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package suites.testObjects.module {
1+
package suites.testObjects.model {
22

33
/**
44
* COMMENT

0 commit comments

Comments
 (0)