DESCRIPTION

tmf: Decouple tmf.core unit tests from TmfEvent

In anticipation of making TmfEvent abstract, make sure the
tests use their own implementation (and ITmfEvent where
possible).

Change-Id: I242a5265c716498392f2b1414785db03f302540d
Signed-off-by: Braxton Mccarthy xxx@xxx.xxx


COMMENTS

author: Braxton Mccarthy
date: 2013-02-01 21:47:19.000000000

Uploaded patch set 2.

-------------------------------------
author: Brenden Conley
date: 2013-02-01 22:01:01.000000000

Patch Set 2:

Build Started https://hudson.eclipse.org/sandbox/job/linuxtools/1266/ 

-------------------------------------
author: Brenden Conley
date: 2013-02-01 22:18:43.000000000

Patch Set 2: Verified

Build Successful 

https://hudson.eclipse.org/sandbox/job/linuxtools/1266/ : SUCCESS

-------------------------------------
author: Luciana Barry
date: 2013-02-05 19:21:24.000000000

Patch Set 2: I would prefer that you didn't submit this

I don't see the benefit of making TmfEvent abstract. I can envision some extensions using it without the need to create a subclass, with TmfEventField allowing the content to be customizable.

-------------------------------------
author: Braxton Mccarthy
date: 2013-02-05 19:36:26.000000000

Patch Set 2:

I've always found the "interface + abstract class" pattern cleaner than providing an implemented class that everybody has to use.

I also think we should take care in the framework to not use Tmf* classes, but the ITmf* interfaces, so that it actually works for people that decide to not extend the base class and go for the interface.

I also think the unit tests should reflect that (not depend on a specific class, but use the interfaces as much as possible). This is mainly what I had in mind for this change.

But in the end, if we really want to keep TmfEvent a "real" class I wouldn't mind. I would have to update this patch's commit message though...

-------------------------------------
author: Luciana Barry
date: 2013-02-05 20:29:08.000000000

Patch Set 2:

I also agree to use ITmfEvent in the framework and the test cases (and pass ITmfEvent.class in the relevant constructors).

But we can also use ITmfEvent event = new TmfEvent(...) in the tests, if we don't really need a stub.

-------------------------------------
