db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "IntroToJUnit" by JohnHEmbretsen
Date Thu, 31 Aug 2006 10:57:44 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by JohnHEmbretsen:
http://wiki.apache.org/db-derby/IntroToJUnit

The comment on the change is:
Fixed intentional and supressed unintentional InterWiki links containing "JUnit"

------------------------------------------------------------------------------
  
   2. Browse to junit.jar, then click Finish.
  
-  3. Right click the Project, New >> JUnit Test Case, package = junitedemo, class name=FirstJUnitTest,
Superclass = junit.framework.!TestCase, don't select any of the method stubs be created, leave
the Class under test blank, click 'Finish'.
+  3. Right click the Project, New >> JUnit Test Case, package = junitedemo, class name=FirstJ!UnitTest,
Superclass = junit.framework.!TestCase, don't select any of the method stubs be created, leave
the Class under test blank, click 'Finish'.
  	
   4. Add the two methods shown above, runTest() and testAdd(), and save the file. 
  
-  5. To run the test right click FirstJUnitTest.java, Run As >> JUnit Test OR click
the icon on the Menu Bar with the green circle and white arrow, Run As >> JUnit Test.
+  5. To run the test right click FirstJ!UnitTest.java, Run As >> JUnit Test OR click
the icon on the Menu Bar with the green circle and white arrow, Run As >> JUnit Test.
  
   6. A new view in Eclipse will appear as a JUnit tab and show if there were any Errors or
Failures. 
  
@@ -255, +255 @@

  
  Compile the class:
  
-  1.#2 C:\junit\junit3.8.2>javac -d classes src/junitdemo/FixtureJUnitTest.java
+  1.#2 C:\junit\junit3.8.2>javac -d classes src/junitdemo/FixtureJ!UnitTest.java
  
  Run the class (since there is a main method, just run it normally):
  {{{
@@ -288, +288 @@

  the case if you will be integrating them into the derby harness) just do the
  following;
  
-  1. remove the main method from Fixture!JUnitTest
+  1. remove the main method from FixtureJ!UnitTest
   2. run the class with the junit.textui.!TestRunner class like before
  {{{
  C:\junit\junit3.8.2>java junit.textui.TestRunner junitdemo.FixtureJUnitTest
@@ -302, +302 @@

   1. Create a one arg constructor which takes a String - the name of the method to run
   2. create a suite() method which returns an implementation of the Test Interface, e.g.
!TestSuite
  
- The class below, SuiteJUnitTest.java demonstrates this.
+ The class below, SuiteJ!UnitTest.java demonstrates this.
  
  ==== Running a Suite of Tests ====
  {{{
@@ -385, +385 @@

  		return suite;
  	}
  }}}
- The output from running the modified !SuiteJUnitTest class, which only runs
+ The output from running the modified SuiteJ!UnitTest class, which only runs
  two tests is shown below; 
  {{{
  C:\junit\junit3.8.2>java junit.textui.TestRunner junitdemo.SuiteJUnitTest
@@ -432, +432 @@

  
  }}}
  
- '''SuiteTest1JUnitTest'''
+ '''SuiteTest1J!UnitTest'''
  {{{
  package junitdemo;
  
@@ -491, +491 @@

  
  }}}
  
- '''SuiteTest2JUnitTest'''
+ '''SuiteTest2J!UnitTest'''
  
  {{{
  package junitdemo;
@@ -618, +618 @@

  == JUnit tests and the Derby test harness ==
  
  There are changes being made to the way the Derby test harness uses JUnit, for more info
refer to these pages on the wiki:
-  * DerbyJUnitTesting
+  * ["DerbyJUnitTesting"]
   * DerbyJunitTestConfiguration, a new page that is under construction 
  
  == Resources ==
@@ -628, +628 @@

  [http://junit.sourceforge.net/doc/faq/faq.htm JUnit FAQ]
  
  The Derby wiki
-  * DerbyJUnitTesting
+  * ["DerbyJUnitTesting"]
   * DerbyJunitTestConfiguration, a new page that is under construction 
  
  Eclipse JUnit Getting Started

Mime
View raw message