⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 songstringtest.java

📁 mp3播放功能
💻 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 + -