資源簡介
有關java單元測試的一些基礎例子,以及TestSuite類的使用。

代碼片段和文件信息
package?com.phicomme.hu;
public?class?Student
{
????private?String?name;
????private?String?sex;
????private?int?high;
????private?int?age;
????private?String?school;
????
????public?Student(String?name?String?sex?int?high?int?age?String?school)
????{
????????this.name?=?name;
????????this.sex?=?sex;
????????this.high?=?high;
????????this.age?=?age;
????????this.school?=?school;
????}
????public?String?getName()
????{
????????return?name;
????}
????public?void?setName(String?name)
????{
????????this.name?=?name;
????}
????public?String?getSex()
????{
????????return?sex;
????}
????public?void?setSex(String?sex)
????{
????????this.sex?=?sex;
????}
????public?int?getHigh()
????{
????????return?high;
????}
????public?void?setHigh(int?high)
????{
????????this.high?=?high;
????}
????public?int?getAge()
????{
????????return?age;
????}
????public?boolean?setAge(int?age)
????{
????????if?(age?>25)
????????{
????????????return?false;
????????}
????????else
????????{
????????????this.age?=?age;
????????????return?true;
????????}???????????????
????}
????
????public?String?getSchool()
????{
????????return?school;
????}
????public?void?setSchool(String?school)
????{
????????this.school?=?school;
????}
????
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????379??2012-12-07?09:39??TestStudent\.classpath
?????文件????????387??2012-12-13?18:23??TestStudent\.project
?????文件????????629??2012-12-07?09:35??TestStudent\.settings\org.eclipse.jdt.core.prefs
?????文件???????1485??2012-12-13?18:28??TestStudent\bin\com\phicomme\hu\Student.class
?????文件???????1342??2012-12-13?18:38??TestStudent\bin\com\phicomme\hu\StudentTest02.class
?????文件????????656??2012-12-13?18:44??TestStudent\bin\com\phicomme\test\AllTest.class
?????文件???????1235??2012-12-13?18:34??TestStudent\bin\com\phicomme\test\StudentTest.class
?????文件???????1326??2012-12-13?18:40??TestStudent\bin\com\phicomme\test\StudentTest01.class
?????文件???????1293??2012-12-13?18:28??TestStudent\src\com\phicomme\hu\Student.java
?????文件????????657??2012-12-13?18:38??TestStudent\src\com\phicomme\hu\StudentTest02.java
?????文件????????571??2012-12-13?18:44??TestStudent\src\com\phicomme\test\AllTest.java
?????文件????????953??2012-12-13?18:34??TestStudent\src\com\phicomme\test\StudentTest.java
?????文件???????1160??2012-12-13?18:40??TestStudent\src\com\phicomme\test\StudentTest01.java
?????目錄??????????0??2012-12-13?18:24??TestStudent\bin\com\phicomme\hu
?????目錄??????????0??2012-12-13?18:25??TestStudent\bin\com\phicomme\test
?????目錄??????????0??2012-12-13?18:24??TestStudent\src\com\phicomme\hu
?????目錄??????????0??2012-12-13?18:25??TestStudent\src\com\phicomme\test
?????目錄??????????0??2012-12-13?18:23??TestStudent\bin\com\phicomme
?????目錄??????????0??2012-12-07?09:40??TestStudent\src\com\phicomme
?????目錄??????????0??2012-12-13?18:23??TestStudent\bin\com
?????目錄??????????0??2012-12-07?09:35??TestStudent\src\com
?????目錄??????????0??2012-12-07?09:35??TestStudent\.settings
?????目錄??????????0??2012-12-13?18:23??TestStudent\bin
?????目錄??????????0??2012-12-07?09:35??TestStudent\src
?????目錄??????????0??2012-12-07?09:35??TestStudent
-----------?---------??----------?-----??----
????????????????12073????????????????????25
- 上一篇:ImagePicker-master.zip
- 下一篇:Java防篡改方式
評論
共有 條評論