?? songstringtest.java
字號:
package Function;
import java.io.File;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class SongStringTest {
public SongString song1;
private File mp3 = new File("cry on my shoulder.mp3");
private String nameExpected = "cry on my shoulder.mp3";
private String pathExpected = "C:\\Documents and Settings\\sony\\workspace\\" +
"OurMp3\\cry on my shoulder.mp3";
@Before
public void setUp() throws Exception {
song1 = new SongString("cry on my shoulder.mp3", mp3.getAbsolutePath());
}
@After
public void tearDown() throws Exception {
}
@Test
public void testGetName(){
assertEquals(nameExpected, song1.getName());
}
@Test
public void testGetPath(){
assertEquals(pathExpected, song1.getPath());
}
@Test
public void testToString(){
assertEquals(nameExpected, song1.getName());
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -