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

📄 fileinfotest.java

📁 We intend to develop a wifi enabled p2p file sharing system on a linux platform using jxta and java.
💻 JAVA
字号:
/**
* Filename: FileInfoTest.java
*
* Test Type: Whitebox Unit Test 
*
* Description: 
*	Tests setFileState() method of FileInfo class.
*	Looking at the code the maximum allowed value for fileState is 5,
*	which is CANCELLED state. This test case passes 6 as the fileState
*	to setFileState() method to see if an exception is thrown.
*	The test case passes if an exception is thrown and fails otherwise.
*
* 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.*;

public class FileInfoTest extends TestCase {

//	private NodeObject nodeObject	= new NodeObject("user", "2.3.4.5", "myNode");
//	private FileInfo fileInfo = new FileInfo("filename", "filepath", false, nodeObject);

	public void testSetFileStateMethod() {
		int fState = FileInfo.CANCELLED + 1;

		try {
//			fileInfo.setFileState(fState);
//			Assert.assertTrue(fileInfo.getFileState() == 0);
		} catch (Exception e) {
//			Assert.assertTrue(fileInfo.getFileState() == fState);
		}
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -