Commits

Anonymous committed ba4a9b1

in order to simplify dependencies I added repackaged version of asmock 0.9

  • Participants
  • Parent commits 9cfbc0d

Comments (0)

Files changed (3)

mockito/src/main/flex/org/mockito/impl/AsmockMockery.as

  */
 package org.mockito.impl
 {
-    import asmock.framework.MockRepository;
-    import asmock.framework.proxy.*;
-    import asmock.reflection.*;
+import flash.events.ErrorEvent;
+
+import org.mockito.asmock.framework.MockRepository;
+    import org.mockito.asmock.framework.proxy.*;
+    import org.mockito.asmock.reflection.*;
     
     import flash.events.Event;
     import flash.events.IEventDispatcher;
     import org.mockito.api.Invocation;
     import org.mockito.api.MockCreator;
     import org.mockito.api.MockInterceptor;
-    import asmock.framework.asmock_internal;
+    import org.mockito.asmock.framework.asmock_internal;
 
 import org.mockito.api.SequenceNumberGenerator;
 
                                       sequenceNumberGenerator.next());
         }
 
-        public function prepareClasses(classes:Array, calledWhenClassesReady:Function):void
+        public function prepareClasses(classes:Array, calledWhenClassesReady:Function, calledWhenPreparingClassesFailed:Function=null):void
         {
             var dispatcher:IEventDispatcher = super.prepare(classes);
             var repositoryPreparedHandler:Function = function (e:Event):void
             {
                 calledWhenClassesReady();
             };
+            var repositoryPreparationFailed:Function = function (e:Event):void
+            {
+                if (calledWhenPreparingClassesFailed != null)
+                    calledWhenPreparingClassesFailed();
+            };
             dispatcher.addEventListener(Event.COMPLETE, repositoryPreparedHandler);
+            dispatcher.addEventListener(ErrorEvent.ERROR, repositoryPreparationFailed);
         }
 
         public function mock(clazz:Class, name:String=null, constructorArgs:Array=null):*

mockito/src/main/flex/org/mockito/impl/AsmockOriginalCallSeam.as

 
 package org.mockito.impl
 {
-import asmock.framework.proxy.IInvocation;
+import org.mockito.asmock.framework.proxy.IInvocation;
 
 import org.mockito.api.OriginalCallSeam;
 

mockito/src/main/flex/org/mockito/impl/matchers/MatcherFunctions.as

  */
 package org.mockito.impl.matchers
 {
-    import asmock.reflection.Type;
+    import org.mockito.asmock.reflection.Type;
     
 
     public class MatcherFunctions