[Geoserver-devel] Adding new feature types when testing

Andrea,

I noticed some of your unit tests require additional types to be
declared in the configuration past the ones defined by cite. I have run
into this case as well but the approach i have taken is not to make them
part of the core of MockData, but to install them just for that test on
the fly. See MockData#addFeatureType. I realize this is not documented
so I do not expect you to have known this.

Any objection to me changing the tests that do this? My rationale is
that I would like a way new types for testing without bloating the mock
data stuff. Imagine when we get up to having hundreds of types (you
never know), and having to load all of them for every test.

-Justin

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Justin Deoliveira ha scritto:

Andrea,

I noticed some of your unit tests require additional types to be
declared in the configuration past the ones defined by cite. I have run
into this case as well but the approach i have taken is not to make them
part of the core of MockData, but to install them just for that test on
the fly. See MockData#addFeatureType. I realize this is not documented
so I do not expect you to have known this.

I did not notice in fact... having do general docs my approach to unit
testing has been "monkey see, monkey do" so far :slight_smile:

Any objection to me changing the tests that do this? My rationale is
that I would like a way new types for testing without bloating the mock
data stuff. Imagine when we get up to having hundreds of types (you
never know), and having to load all of them for every test.

Sure, no problem, but... can you wait committing the changes
so that I can finish the release?
Cheers
Andrea