I have a class that looks like this:
---imports---
class ErroringClass {
/* methods*/
main{}
}
class TestErroringClass {
static ArrayList<Integer> arrayTestTimes;
static ErroringClass main = new ErroringClass ();
@Test
public test{}
.
.
.
}
Testsuite: ErrorTestClass Tests run: 2, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 0.053 sec
Testcase: initializationError took 0.002 sec Caused an ERROR The class ErrorTestClass is not public. java.lang.Exception: The class ErrorTestClass is not public. at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
Testcase: initializationError took 0 sec Caused an ERROR Test class should have exactly one public constructor java.lang.Exception: Test class should have exactly one public constructor at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
<!-- Testsuite -->
<target name="test" depends="compile" >
<junit fork="yes"
description="Unit Tests"
showoutput="true"
printsummary="true"
outputtoformatters="true" filtertrace="on">
<classpath>
<path refid="classpath.test"/>
<pathelement location="${main.build.dir}"/>
<pathelement location="${test.build.dir}"/>
</classpath>
<test name="ErrorTestClass" outfile="./output" >
<!-- <formatter type="brief" usefile="true" /> -->
<formatter type="plain" usefile="true" />
</test>
</junit>
</target>
Trying to run my test from ant and not getting them to see all my files that are in one file to keep the source as accessible following the rules in design. What am I missing?
Aucun commentaire:
Enregistrer un commentaire