📄 musicprofiletest.java
字号:
/**
* Filename: FileInfoTest.java
*
* Test Type: Blackbox Unit Test
*
* Description: Tests all setter methods in MusicProfile Class
*
* Project: Linux-WIFI Project (Group 38 - CS 329)
* Submitted by: Faisal Razzaq (razzaq) and Srinivas Kattragadda (kattraga)
*
* Last Updated On: 3/11/03
*/
package edu.uiuc.cs.cs327.linuxwifi.services;
import java.lang.String;
import junit.framework.*;
/**
* This class should test the MusicProfile Class
*/
public class MusicProfileTest extends TestCase {
private MusicProfile musicProfile = new MusicProfile();
/**
* This method tests the setFileFormat() method
*/
public void testSetFileFormatMethod() {
musicProfile.setFileFormat("mpeg");
String expectedFileFormat = "mpeg";
String musicProfileFileFormat = musicProfile.getFileFormat();
Assert.assertTrue(expectedFileFormat.equals(musicProfileFileFormat));
}
/**
* This method tests the setMaxFileSize() method
*/
public void testSetMaxFileSizeMethod() {
musicProfile.setMaxFileSize(50000);
int expectedMaxFileSize = 50000;
int musicProfileMaxFileSize = musicProfile.getMaxFileSize();
Assert.assertTrue(expectedMaxFileSize == musicProfileMaxFileSize);
}
/**
* This method tests the setArtist() method
*/
public void testSetArtistMethod() {
musicProfile.setArtist("Srini");
String expectedArtist = "Srini";
String musicProfileArtist = musicProfile.getArtist();
Assert.assertTrue(expectedArtist.equals(musicProfileArtist));
}
/**
* This method tests the setSong() method
*/
public void testSetSongMethod() {
musicProfile.setSong("ILU ILU");
String expectedSong = "ILU ILU";
String musicProfileSong = musicProfile.getSong();
Assert.assertTrue(expectedSong.equals(musicProfileSong));
}
/**
* This method tests the setGenre() method
*/
public void testSetGenreMethod() {
musicProfile.setGenre("pop");
String expectedGenre = "pop";
String musicProfileGenre = musicProfile.getGenre();
Assert.assertTrue(expectedGenre.equals(musicProfileGenre));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -