implement Entries test

This commit is contained in:
Imgaojp 2017-02-17 14:43:38 +08:00
parent 06831e48d6
commit bfd2ffa3a5
3 changed files with 115 additions and 0 deletions

View File

@ -26,4 +26,13 @@ package com.gabongao.jvm.classpath;
*/
public class Entry_Composite extends Entry {
@Override
public byte[] readClass(String className) {
return new byte[0];
}
@Override
public String toString() {
return null;
}
}

View File

@ -0,0 +1,53 @@
package test.com.gabongao.jvm.classpath;
import com.gabongao.jvm.classpath.Entry_Dir;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.framework.TestCase;
/**
* Entry_Dir Tester.
*
* @author <Authors name>
* @since <pre>02/17/2017</pre>
* @version 1.0
*/
public class Entry_DirTest extends TestCase {
public Entry_DirTest(String name) {
super(name);
}
public void setUp() throws Exception {
super.setUp();
}
public void tearDown() throws Exception {
super.tearDown();
}
/**
*
* Method: readClass(String className)
*
*/
public void testReadClass() throws Exception {
//TODO: Test goes here...
Entry_Dir entry_dir = new Entry_Dir("D:\\Programming\\Java\\JVM\\out\\production\\JVM\\com\\gabongao\\jvm\\");
entry_dir.readClass("Cmd.class");
}
/**
*
* Method: toString()
*
*/
public void testToString() throws Exception {
//TODO: Test goes here...
}
public static Test suite() {
return new TestSuite(Entry_DirTest.class);
}
}

View File

@ -0,0 +1,53 @@
package test.com.gabongao.jvm.classpath;
import com.gabongao.jvm.classpath.Entry_Zip;
import junit.framework.Test;
import junit.framework.TestSuite;
import junit.framework.TestCase;
/**
* Entry_Zip Tester.
*
* @author <Authors name>
* @since <pre>02/17/2017</pre>
* @version 1.0
*/
public class Entry_ZipTest extends TestCase {
public Entry_ZipTest(String name) {
super(name);
}
public void setUp() throws Exception {
super.setUp();
}
public void tearDown() throws Exception {
super.tearDown();
}
/**
*
* Method: readClass(String className)
*
*/
public void testReadClass() throws Exception {
//TODO: Test goes here...
Entry_Zip entry_zip = new Entry_Zip("C:\\Program Files\\Java\\jdk1.8.0_77\\jre\\lib\\jfxswt.jar");
entry_zip.readClass("javafx/embed/swt/CustomTransfer.class");
}
/**
*
* Method: toString()
*
*/
public void testToString() throws Exception {
//TODO: Test goes here...
}
public static Test suite() {
return new TestSuite(Entry_ZipTest.class);
}
}