<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\begin{slide}{Testen mit JUnit}

\url{http://junit.org/index.htm}

\begin{verbatim}
import junit.framework.*;
class X extends TestCase {
  static int f (int y) { ... }

  public static void testf () { 
    assertEquals ("foo", 4, f(7));
  }
  public static void main (String [] argv) {
      junit.awtui.TestRunner.run(X.class);
  } // führt alle  test*()-Methoden  aus
}
\end{verbatim}

\end{slide}

\begin{slide}{JUnit und Extreme Programming}



Kent Beck  empfiehlt \emph{test driven apporach}:
\begin{itemize}
\item
  \emph{erst} alle Test-Methoden schreiben,
\item
  \emph{dann} eigentliche Methoden implementieren
\end{itemize}

\end{slide}
</pre></body></html>