fileinfotest.java

来自「We intend to develop a wifi enabled p2p 」· Java 代码 · 共 39 行

JAVA
39
字号
/**
* 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 + =
减小字号Ctrl + -
显示快捷键?