Commit 11369a61 authored by Dr. Martin Goik's avatar Dr. Martin Goik

Only private enum constructors, start Junit tooling section

parent b459dd57
......@@ -10531,6 +10531,43 @@ class_wrapper_private.Day'</emphasis></screen></td>
}
}</programlisting>
</figure>
<figure xml:id="sd1_fig_enumOnlyPrivateConstructor">
<title> Constructor implicitly <code
language="java">private</code></title>
<informaltable border="0">
<colgroup width="36%"/>
<colgroup width="64%"/>
<tr>
<td valign="top"><programlisting language="java">public enum Day {
...
<emphasis role="red">private</emphasis> Day(final String name)
{ ...</programlisting></td>
<td valign="top"><para>Compile time warning:</para><para><emphasis
role="red">Modifier 'private' is redundant for <code
language="java">enum</code> constructors</emphasis></para></td>
</tr>
<tr>
<td valign="top"><programlisting language="java">public enum Day {
...
<emphasis role="red">public</emphasis> Day(final String name)
{ ...</programlisting></td>
<td valign="top"><para>Compile time error:</para><para><emphasis
role="red">Modifier 'public' not allowed
here</emphasis></para></td>
</tr>
</informaltable>
<para>Prohibits <link
linkend="sd1_fig_preventUndesiredDayCreation"><code
language="java">enum</code> external instance creation</link>.</para>
</figure>
</section>
</section>
......@@ -11076,11 +11113,11 @@ Results :
</section>
<section xml:id="sd1_sect_junitDetails">
<title><xref linkend="glo_Junit"/>, important details</title>
<title>Helpful <xref linkend="glo_Junit"/> methods</title>
<info>
<abstract>
<para>Selected assert methods.</para>
<para>Selected assertion methods.</para>
<para>Considerations when comparing <code>float</code> and
<code>double</code> values.</para>
......@@ -11485,5 +11522,51 @@ Elapsed time: 25422 nanoseconds</screen>
</qandadiv>
</qandaset>
</section>
<section xml:id="sd1_sect_junitTechDetails">
<title>Technical details</title>
<info>
<abstract>
<para><xref linkend="glo_Junit"/> Building Blocks: Classes and
interfaces</para>
<para>Integration using <xref linkend="glo_Maven"/>.</para>
</abstract>
</info>
<figure xml:id="sd1_fig_junitTestAnnotation">
<title>The <interfacename
xlink:href="https://github.com/junit-team/junit4/blob/master/src/main/java/org/junit/Test.java">@Test</interfacename>
annotation</title>
<informaltable border="0">
<colgroup width="26%"/>
<colgroup width="74%"/>
<tr>
<td valign="top"><programlisting language="java">...
public
@interface <link xlink:href="https://github.com/junit-team/junit4/blob/master/src/main/java/org/junit/Test.java">Test</link> {
...
}</programlisting></td>
<td valign="top"><itemizedlist>
<listitem>
<para><interfacename>@interface</interfacename> defining an
<link
xlink:href="https://docs.oracle.com/javase/tutorial/java/annotations">annotation</link>.</para>
</listitem>
<listitem>
<para>Purpose: Allows for automatic detection of test
methods.</para>
</listitem>
</itemizedlist></td>
</tr>
</informaltable>
</figure>
</section>
</section>
</chapter>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment