Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [swordfish-dev] Refactor org.eclipse.swordfish.internal.core.util.smx.ServiceMixSupport class to improve testability

Jürgen,

I strongly support your proposed solution.

Cheers,
Oliver

Am 12.01.2010 um 15:05 schrieb Jürgen Kindler:

Hi all,

As nobody has reacted up to now, I take the opportunity to once again draw your attention on testability:

I have stumbled several times over it now and it’s a pain in the neck to have to satisfy the requirements of the
ServiceMixSupport class when testing with mock objects ... apart from the fact that it has a bad smell, consisting of static methods only.

Being able to mock the functions of ServiceMixSupport will significantly simplify tests of existing code that depends on this class, because we can cut of levels of mocks required by the static implementation.

As there are quite a few references to ServiceMixSupport, I propose that we create an internal OSGi (singleton) service that offers the functionality that is currently offered by this class and (for now) redirect from this service to the old implementation. As soon as all references to the old implementation are gone, we can move all the logic to the service class and remove the old one.

Awaiting your comments ...

CU
  Jürgen

--

Jürgen Kindler
<ATT00001.c>

Oliver Wolf
Chief Architect 
Tel.:    +49 228-182 19059
Fax:    +49 228-182 19193
Mobil:  +49 160-98931313
oliver.wolf@xxxxxxxxx

Wussten Sie schon? 
SOPERA <http://www.osbf.de/de/node/1466>  hat den Open Source Business Award 2009 <http://www.osbf.de/en/node/1466>  verliehen bekommen!  

SOPERA GmbH - Open Source SOA
Subscription Services, Support & Maintenance, Training, 
Technical SOA Consulting & Customized Development
www.sopera.de <http://www.sopera.de/
 
SOPERA GmbH · Geschäftsführer: Dr. Ricco Deutscher, Harald Weimer, Peter Spiegel
Sträßchensweg 10 · 53113 Bonn · Handelsregister: Bonn HRB 15336
Hohenlindnerstraße 11b · 85622 München
 

Vertraulichkeitshinweis: Diese Nachricht und jeder übermittelte Anhang beinhaltet vertrauliche Informationen und ist nur für die Personen oder das Unternehmen bestimmt, an welche sie tatsächlich gerichtet ist. Sollten Sie nicht der Bestimmungsempfänger sein, weisen wir Sie darauf hin, dass die Verbreitung, das (auch teilweise) Kopieren sowie der Gebrauch der empfangenen E-Mail und der darin enthaltenen Informationen gesetzlich verboten ist und gegebenenfalls Schadensersatzpflichten auslösen kann. Sollten Sie diese Nachricht aufgrund eines Übermittlungsfehlers erhalten haben, bitten wir Sie, den Sender unverzüglich hiervon in Kenntnis zu setzen.


Back to the top