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

📄 systemtest.java

📁 We intend to develop a wifi enabled p2p file sharing system on a linux platform using jxta and java.
💻 JAVA
字号:
/**
 * Filename:		SystemTest.java
 *
 * Test Type:		System Test
 *
 * Description:		Tests the JXTA services used by the application
 *					Classes involved include PeerDiscovery and ServicesApi
 *					  Connects to JXTA services
 *					  Retrieves available nodes
 *					  There should be at least one node available most of the time
 *	 				  except when JXTA services are down
 *
 *					You will be prompted for a JXTA login
 *
 *					Secure Username	: peerrsx
 *					Password		: peerrsx1
 *
 *
 * 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.*;
import java.util.Vector;

public class SystemTest extends TestCase {

	// object to test
	private ServicesApi servicesApi = null;

	// fixture
	protected void setUp(){
		servicesApi = new ServicesApi(null);
		try{
			// wait 25 seconds to retrieve the nodes before the test method is called
		    Thread.sleep(25000);
		 }
		 catch(InterruptedException e) {;}
		}

	protected void tearDown(){
		servicesApi = null;
		}


	// test number of nodes retrieved
	public void testPeerServices() {
		Vector availableNodesVector = servicesApi.getAvailableNodes();
		Assert.assertTrue(availableNodesVector.size()>0);
	}
}

⌨️ 快捷键说明

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