Code example for NetworkInterface

Methods: getDisplayName

0
	 * @tests java.net.NetworkInterface#getDisplayName() 
	 */ 
	public void test_getDisplayName() { 
		if (atLeastOneInterface) {
			assertNotNull("validate that non null display name is returned",
					networkInterface1.getDisplayName());
			assertFalse(
					"validate that non-zero length display name is generated", 
					networkInterface1.getDisplayName().equals(""));
		} 
		if (atLeastTwoInterfaces) {
			assertFalse(
					"Validate strings are different for different interfaces", 
					networkInterface1.getDisplayName().equals(
							networkInterface2.getDisplayName()));
		} 
	} 
 
	/** 
	 * @tests java.net.NetworkInterface#getByName(java.lang.String) 
Experience pair programming with AI  Get Codota for Java