You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2020/01/29 14:44:00 UTC
[isis] 19/19: ISIS-2062: docs
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2062
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 7810df138f42384bb5afb28d152ffdbff3a2ffd0
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Wed Jan 29 13:42:41 2020 +0000
ISIS-2062: docs
---
.../images/pin-enhance-run-configuration.png | Bin 0 -> 22582 bytes
.../adoc/modules/integtestsupport/pages/about.adoc | 15 +++++++++++++--
2 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/testing/integtestsupport/adoc/modules/integtestsupport/images/pin-enhance-run-configuration.png b/testing/integtestsupport/adoc/modules/integtestsupport/images/pin-enhance-run-configuration.png
new file mode 100644
index 0000000..3ceeea6
Binary files /dev/null and b/testing/integtestsupport/adoc/modules/integtestsupport/images/pin-enhance-run-configuration.png differ
diff --git a/testing/integtestsupport/adoc/modules/integtestsupport/pages/about.adoc b/testing/integtestsupport/adoc/modules/integtestsupport/pages/about.adoc
index 127e290..298cbd2 100644
--- a/testing/integtestsupport/adoc/modules/integtestsupport/pages/about.adoc
+++ b/testing/integtestsupport/adoc/modules/integtestsupport/pages/about.adoc
@@ -126,6 +126,8 @@ There's further discussion xref:about.adoc#manual-teardown[below].
The `FixtureScripts` domain service is inherited from the superclass.
+=== Testing a property
+
For example, let's test the `SimpleObject#name` property:
[source,java]
@@ -197,6 +199,8 @@ This will check that property (for access) is visible to the current user.
<4> attempting to set the name on the property (through the wrapper) is disallowed.
We detect this by catching a `DisabledException` (using JUnit 5's `assertThrows()`).
+=== Testing an action
+
The way that the simple app allows the name to be updated is through an `updateName` action:
[source,java]
@@ -274,6 +278,7 @@ This domain service is not part of the production code base, but is detected aut
+
Since this was a successful interaction, there will have been 5 events, one for each of the event phases (hide, disable, validate, executing, executed)
+=== Testing a type meta-annotation
As was pointed out earlier, the `name` parameter to `updateName()` has the `@Name` meta-annotation.
This meta-annotation also defines some business rules, through `@Property` and `@Parameter`:
@@ -592,6 +597,12 @@ If you just want to set up integration testing support, then use:
== Hints-n-Tips
-=== Using JDO/DataNucleus
+[TIP]
+.Using JDO/DataNucleus
+====
+When running integration tests through the IDE, and if using the JDO/DataNucleus ORM, then make sure the module(s) with entities have been enhanced first.
+
+If using IntelliJ, we recommend creating a run Maven configuration that runs `datanucleus:enhance`, and then pinning the configuration once run as a tab in the "Debug" window for easy access.
-When running integration tests through the IDE, if using the JDO/DataNucleus ORM, then make sure the module(s) with entities have been enhanced first.
+image::pin-enhance-run-configuration.png/[width="400px",link="{imagesdir}/pin-enhance-run-configuration.png/"]
+====