Questions tagged [mockolate]

9 questions
1
vote
1 answer

How can I mock an AsyncResponder and the resultant handler functions on a mocked object using FlexUnit 4 and mockolate

I am attempting to write some unit tests for a class I am writing in Flex 4.5.1 using FlexUnit 4 and Mockolate for my testing and mocking framework respectively. I am using as3-signals for my custom events. The functionality that I am writing and…
Ryan Taylor
  • 8,740
  • 15
  • 65
  • 98
1
vote
1 answer

Mockolate: Suddenly getting VerifyError: illegal override

I started using mockolate to write my unit tests a few weeks back, and up 'till now it's worked great. All of a sudden, last night, I started getting errors like the following on every test that uses mockolate: VerifyError: Error #1053: Illegal…
Hob
  • 41
  • 4
1
vote
1 answer

Mockolate: dispatch binding events?

Is it possible to ask Mockolate to dispatch binding events? For example, given this class: class Person { [Bindable] public var name:String; } I'd like the mock: var mockPerson:Person = nice(Person); To dispatch a propertyChangeEvent when…
David Wolever
  • 148,955
  • 89
  • 346
  • 502
1
vote
1 answer

How to debug Mockolate for unit testing

While unit testing in actionscript-3 with mockolate I have run into quite a few problems/errors: Error: No Expectation defined for Invocation:[FloxyInvocation invocationType=GETTER name="propertyName" arguments=[]] Error: 1 unmet…
Jordan.J.D
  • 7,999
  • 11
  • 48
  • 78
1
vote
0 answers

Mocking FileReference.data with mockolate?

I'm trying to mock FileReference in a flex project I'm working on. Stubbing out some properties, such as name and size works fine, but data just refuses to work. Here is code that illustrates the problem: [Test] public function…
luddet
  • 1,235
  • 1
  • 11
  • 11
1
vote
1 answer

Mockolate - Calling the same method on a mock with the same arguments but return different results

I'am using Mockolate and flex unit 4 to write mocks for my tests in AS3. I want to call the same method on a mock with the same arguments multiple times and return a different result each time. A basic example is: [Rule] …
tam203
  • 199
  • 1
  • 2
  • 13
0
votes
1 answer

Mocking a getter than returns an array using Mockolate

I am writing a unit test for a function that calls a getter on my object. The getter should return an array, but I get an exception thrown: Error: No Expectation defined for Invocation:[FloxyInvocation invocationType=GETTER name="getterName"…
Jordan.J.D
  • 7,999
  • 11
  • 48
  • 78
0
votes
1 answer

Mockolate Verify Error: Illegal override.. after Flex SDK 4.10 update

Since we upgraded the flex sdk in our application to 4.10 we've been running into Verify Errors while running unit tests that use mockolate. They seem to occur when mocking an interface where a ByteArray is used in a method signature. Example…
Bert
  • 257
  • 1
  • 2
  • 10
0
votes
1 answer

How do I get Flexunit, FlexMojos and Mockolate to work together?

For the past two days, I've been trying to get get FlexUnit, FlexMojos, and Mockolate to work together so that I can run tests in TeamCity, but I have not been having any luck. I have one project on Teamcity currently that uses FlexMojos and the…
Bob
  • 1,605
  • 2
  • 18
  • 33