Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: moved serial version uid section to code-style subpage
Wiki Markup
{rate}

Magnolia contributors are kindly requested to follow the simple conventions listed an the child pages. Also see [Naming conventions].

h2. Style of JUnit-Tests
With Magnolia 5 we witched to JUnit 4. As it is fully backwards compatible this does not enforce you to write your tests in the new v4-style (e.g. use @Test, @Before etc.).

We set up the following rule:
* all new test will be written in JUnit 4 style
* existing tests can/should be updated if you're touching them anyway
* existing superclasses for tests (especially in core) cannot that easily be updated as there might be lots of subclasses affected by that change. We'll lift them to v4 style in a consolidated action [(see MAGNOLIA-3655)|http://jira.magnolia-cms.com/browse/MAGNOLIA-3655]

h2. serialVersionUID's
We don't explicitly set serialVersionUID's as we don't want to decide ourselves when these id's should be updated. We rely on the JVM doing that for us (being aware that this id's could potentially differ from JVM to JVM). IF for any (valid) reason, such an id would be needed for a given class, the reason needs to be documented in the code. Failing that, there's a good chance the field will be removed by a fellow zealous developer.