Skip to main content
Known Participant
September 28, 2009
Question

IRunner interface depends on concrete class

  • September 28, 2009
  • 1 reply
  • 2349 views

I am interested in implementing the org.flexunit.runner.IRunner interface. However, there is a reference to the concrete class AsyncTestToken:

function run( notifier:IRunNotifier, previousToken:AsyncTestToken ):void;

Can previousToken be typed to an interface instead?

Robert

This topic has been closed for replies.

1 reply

Participating Frequently
September 28, 2009

I have gone back and forth on this a bit actually. I am willing to reconsider but when I last looked at the issue I concluded it was best to actually leave this one code to an implementation. However, since I don't remember my reasons, I will need to revisit my notes.

Mike

Participating Frequently
September 28, 2009

okay, it could be an interface and I will play with the change. Remember though that this is something your class is actually passed from the framework so even if it is defined as an interface, you will actually always be receiving an AsyncTestToken (at least for the forseeable future).

Mike

Known Participant
September 28, 2009

Cool, thanks. Receiving an interface will reduce the surface area I have to worry about.