Skip to main content
Known Participant
Sep 28, 2009 3:42 AM UTC
Question

IRunner interface depends on concrete class

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 is closed to new replies. Start a new post to keep the conversation going.

11 replies

Participating Frequently
Sep 28, 2009 3:44 AM UTC

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

Translate
Participating Frequently
Sep 28, 2009 3:50 AM UTC

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

Translate
Known Participant
Sep 28, 2009 3:56 AM UTC

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

Translate