HHH-5761 - Update source repository links in Envers documentation
This commit is contained in:
parent
b37cd1a8d6
commit
fb8ec5e3f9
|
@ -30,45 +30,75 @@
|
||||||
<chapter id="source">
|
<chapter id="source">
|
||||||
<title>Building from source and testing</title>
|
<title>Building from source and testing</title>
|
||||||
|
|
||||||
<para>
|
<section id="source-checkout">
|
||||||
Envers, as a module of Hibernate, uses a standard Maven2 build. So all the usual
|
<title>Building from source</title>
|
||||||
build targets (compile, test, install) will work.
|
<para>
|
||||||
</para>
|
Envers, as a module of Hibernate, uses the standard Hibernate build. So all the usual
|
||||||
|
build targets (compile, test, install) will work.
|
||||||
|
</para>
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
You can check out the source code
|
The public Hibernate Git repository is hosted at GitHub and can be browsed using
|
||||||
<ulink url="http://anonsvn.jboss.org/repos/hibernate/core/trunk/">from SVN</ulink>,
|
<ulink url="https://github.com/hibernate/hibernate-core">GitHub</ulink>.
|
||||||
or browse it using
|
|
||||||
<ulink url="http://fisheye.jboss.org/browse/Hibernate">FishEye</ulink>.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
The source can be checked out using either
|
||||||
The tests use, by default, use a H2 in-memory database. The configuration
|
<programlisting>
|
||||||
file can be found in <literal>src/test/resources/hibernate.test.cfg.xml</literal>.
|
git clone https://github.com/hibernate/hibernate-core hibernate-core.git
|
||||||
</para>
|
git clone git://github.com/hibernate/hibernate-core.git
|
||||||
|
</programlisting>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<para>
|
<section id="source-contributing">
|
||||||
The tests use TestNG, and can be found in the
|
<title>Contributing</title>
|
||||||
<literal>org.hibernate.envers.test.integration</literal> package
|
<para>
|
||||||
(or rather, in subpackages of this package).
|
If you want to contribute a fix or new feature, either:
|
||||||
The tests aren't unit tests, as they don't test individual classes, but the behaviour
|
<itemizedlist>
|
||||||
and interaction of many classes, hence the name of package.
|
<listitem>
|
||||||
</para>
|
use the GitHub fork capability: clone, work on a branch, fork the repo on GitHub (fork button), push the work there and trigger a pull request (pull request button).
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
use the pure Git approach: clone, work on a branch, push to a public fork repo hosted somewhere, trigger a pull request
|
||||||
|
(<literal>git pull-request</literal>)
|
||||||
|
</listitem>
|
||||||
|
<listitem>
|
||||||
|
provide a good old patch file: clone the repo, create a patch with git format-patch or diff and attach the patch file to JIRA
|
||||||
|
</listitem>
|
||||||
|
</itemizedlist>
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
<para>
|
<section id="source-tests">
|
||||||
A test normally consists of an entity (or two entities) that will be audited and extends the
|
<title>Envers integration tests</title>
|
||||||
<literal>AbstractEntityTest</literal> class, which has one abstract method:
|
|
||||||
<literal>configure(Ejb3Configuration)</literal>. The role of this method is to add the entities
|
|
||||||
that will be used in the test to the configuration.
|
|
||||||
</para>
|
|
||||||
|
|
||||||
<para>
|
<para>
|
||||||
The test data is in most cases created in the "initData" method (which is called once before
|
The tests use, by default, use a H2 in-memory database. The configuration
|
||||||
the tests from this class are executed), which normally creates a couple of revisions,
|
file can be found in <literal>src/test/resources/hibernate.test.cfg.xml</literal>.
|
||||||
by persisting and updating entities. The tests first check if the revisions, in which
|
</para>
|
||||||
entities where modified are correct (the testRevisionCounts method), and if the historic
|
|
||||||
data is correct (the testHistoryOfXxx methods).
|
<para>
|
||||||
</para>
|
The tests use TestNG, and can be found in the
|
||||||
|
<literal>org.hibernate.envers.test.integration</literal> package
|
||||||
|
(or rather, in subpackages of this package).
|
||||||
|
The tests aren't unit tests, as they don't test individual classes, but the behaviour
|
||||||
|
and interaction of many classes, hence the name of package.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
A test normally consists of an entity (or two entities) that will be audited and extends the
|
||||||
|
<literal>AbstractEntityTest</literal> class, which has one abstract method:
|
||||||
|
<literal>configure(Ejb3Configuration)</literal>. The role of this method is to add the entities
|
||||||
|
that will be used in the test to the configuration.
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<para>
|
||||||
|
The test data is in most cases created in the "initData" method (which is called once before
|
||||||
|
the tests from this class are executed), which normally creates a couple of revisions,
|
||||||
|
by persisting and updating entities. The tests first check if the revisions, in which
|
||||||
|
entities where modified are correct (the testRevisionCounts method), and if the historic
|
||||||
|
data is correct (the testHistoryOfXxx methods).
|
||||||
|
</para>
|
||||||
|
</section>
|
||||||
|
|
||||||
</chapter>
|
</chapter>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue