I guess I sent this to the wrong ML


-------- Forwarded Message --------
Subject:        [Geoserver-devel] powermock for unit tests in app-schema
Date:   Mon, 8 Mar 2021 13:01:23 +0100
From: Niels Charlier via Geoserver-devel <geoserver-de...@lists.sourceforge.net>
Reply-To:       Niels Charlier <ni...@scitus.be>
To:     Geoserver-devel <geoserver-de...@lists.sourceforge.net>



Hello,

I fixed a bug in geoserver app-schema (https://github.com/geotools/geotools/pull/3367 https://osgeo-org.atlassian.net/browse/GEOT-6801). The change I made was very small (one character actually) and in one specific class. To me it seemed appropriate to write a unit test. Since it is JDBC an integration test would only be run online with db, but still require a lot of amount of work to create the right table, mapping etc... Mocking seems useful to me.

Anyway, because one of the classes I need is final, I had to use PowerMock to write the test. The Reviewer of the patch ask to check with the list if it is okay to add the PowerMock library to the test scope. I know traditionally we have more integration tests than unit tests, but I think it wouldn't be bad to add more unit tests in general.

Kind Regards

Niels



_______________________________________________
Geoserver-devel mailing list
geoserver-de...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to