Posted By:
learner_java
Posted On:
Tuesday, July 15, 2003 12:00 PM
hi all I have set successful my classpath and everything, my sample codes run well. And I tried to write a Junit Test program to test my simple Java Swing class as following: package test.sydney.midas.gui; public class Addition { public Addition() { } public static void main(String[] args) { Addition addition1 = new Addition(); System.out.println("result:"+(1+2)); } } This Addition class locate in D: est.sydney.midas.gui while I installed my Junit. and my set classpath=c:junit3junit.jar;c:junit3 where i installed. An
More>>
hi all
I have set successful my classpath and everything, my sample codes run well.
And I tried to write a Junit Test program to test my simple
Java Swing class as following:
package test.sydney.midas.gui;
public class Addition {
public Addition() {
}
public static void main(String[] args) {
Addition addition1 = new Addition();
System.out.println("result:"+(1+2));
}
}
This Addition class locate in D: est.sydney.midas.gui while I installed my Junit.
and
my set classpath=c:junit3junit.jar;c:junit3 where i installed.
And here is my Junit program called HW.java:
package junit.samples;
import test.sydney.midas.gui;
import junit.framework.*;
public class HW {
public static void main (String[] args) {
junit.textui.TestRunner.run (suite());
}
public static Test suite ( ) {
TestSuite suite= new TestSuite("All JUnit Tests");
suite.addTest(new TestSuite Addition.class));
return suite;
}
}
when I run I got error like this:
Can not resolve symbol class Addition
location: HW class...
please help me!!
<<Less