Why ?
The system under development is a bridge between your Fixtures and the system your testing.
If you want to change the way GreenPepper is finding/instanciating your fixtures, or if you need to hook the document execution then you can define a Custom System Under Development.
...
Code Block | ||
---|---|---|
| ||
public static T ValueOf(string text) // And then to revert back to a string, public static String ToString(T value) |
...
Your class does not have to provides both of them.
...
This could be useful when you are using for example an IOC, like Spring (see Spring Example) or just when you want to add locations (packages in java, namespaces in .Net) for GreenPepper can resolve your fixtures.
To change the system under development :
- With GreenPepper Server : Server system under development configuration
- With GreenPepper Open : Command line system under development configuration
Only for specifying location to resolve fixtures (packages in java, namespaces in .Net)
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public static class CustomSystemUnderDevelopment extends DefaultSystemUnderDevelopment { public CustomSystemUnderDevelopment( String... params ) { super.addImport("com.mycompany.fixtures"); super.addImport("com.mycompany.specials.fixtures"); } } |
By this custom system under development you tell GreenPepper to look in "com.mycompany.fixtures" and "com.mycompany.specials.fixtures" to resolve fixtures in specfications that your are running.
...