diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml index 2585f84fe689a0db51e358260d595a2d61691774..3642c9e59bc44583e44270be85348374043677e9 100644 --- a/Doc/Sd1/objectsClasses.xml +++ b/Doc/Sd1/objectsClasses.xml @@ -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>