?? serializationtest.java
字號:
package org.apache.commons.logging.impl;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.ObjectOutputStream;
import junit.framework.TestCase;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class SerializationTest extends TestCase {
ObjectOutputStream oos;
public SerializationTest(String name) {
super(name);
}
protected void setUp() throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
oos = new ObjectOutputStream(baos);
super.setUp();
}
protected void tearDown() throws Exception {
super.tearDown();
oos.close();
}
public void testSmokeSimple() throws IOException {
Log log = LogFactory.getLog("testing");
oos.writeObject(log);
}
public void testSmokeLocationAware() throws IOException {
SLF4JLocationAwareLog log = new SLF4JLocationAwareLog(null);
oos.writeObject(log);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -