Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Issues with testing and Mockolate #27

Open
nestradaOBS opened this issue Jan 5, 2014 · 2 comments
Open

Issues with testing and Mockolate #27

nestradaOBS opened this issue Jan 5, 2014 · 2 comments

Comments

@nestradaOBS
Copy link

Hello,

I'm trying to mock some interfaces which return promises and it seems that mockolate and promise-as3 don't work well together. Typically I will have a method which returns a Promise, however when running the test I get the following error:

D:\libs\adobe\flex\sdk\4.6\bin\adl.exe -profile extendedDesktop D:\testApp\out\test\desktop\_flexunit-descriptor.xml D:\testApp\out\test\desktop
Player connected; session starting.
[Fault] exception, information=VerifyError: Error #1053: Illegal override of TestInterface600C55060B003CF6CD88EB5CFE69DFE741318F03 in mockolate.generated.TestInterface600C55060B003CF6CD88EB5CFE69DFE741318F03

I've included the proof source which is sufficient:

TestInterface
package {
import com.codecatalyst.promise.Promise;
public interface TestInterface {
    function method() : void;
    function method2() : Promise;
}
}
MockPromiseTest
package {
import mockolate.runner.MockolateRule;
public class MockPromiseTest {
    [Rule]
    public var mocks : MockolateRule = new MockolateRule();
    [Mock]
    public var intrfc : TestInterface;

    [Test]
    public function test() : void {
    }
}
}

In the meantime I'll be making my own stubs however it would be nice to understand what is bothering mockolate (If you comment out method2 no errors occur).

Thanks in advance

@mikecann
Copy link

Did you ever get to the bottom of this? Im having issues with it too..

@mikecann
Copy link

I have located the problem and submitted a pull request, see my change above.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants