You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "Zimmermann, Patrick" <pa...@haltec.de> on 2014/09/18 12:39:26 UTC
Tests for D*
Hello everyone,
I have an implementation for the DGet and DMin functions that I'd like to
get into POI.
I don't have tests yet and am unsure what the best way to write those is.
After a quick look at how the other functions do their tests it seems that
they usually mock up the inputs for testing.
The setup for using D* functions is rather complex (requiring a set of cells
as database), thus mocking all of that up in Java seems complex and error
prone.
Should I still try to do this using mocks or are there other possibilities?
Mit freundlichen Grüßen
Patrick Zimmermann
IT-Abteilung
HALTEC Hallensysteme GmbH
Standort Stuttgart
Talstraße 5
D-70825 Korntal-Münchingen
Tel.: +49 (0) 711 86 03 69-56
Fax: +49 (0) 711 86 03 69-59
patrick.zimmermann@haltec.de
www.haltec.de <http://www.haltec.de/>
Sitz der Gesellschaft: Hemer, Amtsgericht Iserlohn HRB 2135
Geschäftsführer: Thomas Arens, Jens Geißner, Markus Speck
AW: Tests for D*
Posted by "Zimmermann, Patrick" <pa...@haltec.de>.
Thanks!
I'll go for the Excelsheet way then.
Mit freundlichen Grüßen
Patrick Zimmermann
-----Ursprüngliche Nachricht-----
Von: Nick Burch [mailto:apache@gagravarr.org]
Gesendet: Donnerstag, 18. September 2014 13:47
An: POI Developers List
Betreff: Re: Tests for D*
On Thu, 18 Sep 2014, Zimmermann, Patrick wrote:
> I don't have tests yet and am unsure what the best way to write those
> is. After a quick look at how the other functions do their tests it
> seems that they usually mock up the inputs for testing.
For simpler functions, this is the best way to do it, as it allows for
fine-grained testing.
For some complex functions, the tests will load up an Excel file with the
input data pre-set up, and probably the formula already there and calculated
by Excel. They then evaluate the formula, and ensure they get the same
answer as Excel did
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org For additional
commands, e-mail: dev-help@poi.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org
Re: Tests for D*
Posted by Nick Burch <ap...@gagravarr.org>.
On Thu, 18 Sep 2014, Zimmermann, Patrick wrote:
> I don't have tests yet and am unsure what the best way to write those
> is. After a quick look at how the other functions do their tests it
> seems that they usually mock up the inputs for testing.
For simpler functions, this is the best way to do it, as it allows for
fine-grained testing.
For some complex functions, the tests will load up an Excel file with the
input data pre-set up, and probably the formula already there and
calculated by Excel. They then evaluate the formula, and ensure they get
the same answer as Excel did
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org