mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
unittests converted to JUnit4 and some of them fixed
git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/trunk/ipscan@79 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
parent
efe0ae0214
commit
edf8a426cd
53
.classpath
53
.classpath
@ -1,27 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="ext/rocksaw/src/java"/>
|
||||
<classpathentry kind="src" path="ext/vserv-tcpip/src/java"/>
|
||||
<classpathentry kind="src" path="resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="lib" path="ext/rocksaw/lib/tmp.jar">
|
||||
<attributes>
|
||||
<attribute value="ipscan/ext/rocksaw/lib" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3.8.1"/>
|
||||
<classpathentry sourcepath="/swt/src" kind="lib" path="/swt/swt-win32.jar">
|
||||
<attributes>
|
||||
<attribute value="swt/lib" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry sourcepath="/swt/src" kind="lib" path="/swt/swt-gtk.jar">
|
||||
<attributes>
|
||||
<attribute value="swt/lib" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry sourcepath="ext/picocontainer/src" kind="lib" path="ext/picocontainer/picocontainer-1.0.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="ext/rocksaw/src/java"/>
|
||||
<classpathentry kind="src" path="ext/vserv-tcpip/src/java"/>
|
||||
<classpathentry kind="src" path="resources"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry kind="lib" path="ext/rocksaw/lib/tmp.jar">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="ipscan/ext/rocksaw/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/swt/swt-win32.jar" sourcepath="/swt/src">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="swt/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="/swt/swt-gtk.jar" sourcepath="/swt/src">
|
||||
<attributes>
|
||||
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="swt/lib"/>
|
||||
</attributes>
|
||||
</classpathentry>
|
||||
<classpathentry kind="lib" path="ext/picocontainer/picocontainer-1.0.jar" sourcepath="ext/picocontainer/src"/>
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/swt"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#Thu Dec 14 22:09:10 EET 2006
|
||||
#Tue Dec 26 20:43:25 EET 2006
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.codeComplete.argumentPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.argumentSuffixes=
|
||||
@ -8,6 +8,16 @@ org.eclipse.jdt.core.codeComplete.localPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.localSuffixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldPrefixes=
|
||||
org.eclipse.jdt.core.codeComplete.staticFieldSuffixes=
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=disabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.4
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.4
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=warning
|
||||
org.eclipse.jdt.core.compiler.source=1.4
|
||||
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
|
||||
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
|
||||
|
||||
@ -1,8 +1,7 @@
|
||||
#Thu Dec 14 22:09:10 EET 2006
|
||||
#Tue Dec 26 20:43:25 EET 2006
|
||||
eclipse.preferences.version=1
|
||||
formatter_profile=_Angry IP Scanner
|
||||
formatter_settings_version=10
|
||||
internal.default.compliance=user
|
||||
org.eclipse.jdt.ui.exception.name=e
|
||||
org.eclipse.jdt.ui.gettersetter.use.is=true
|
||||
org.eclipse.jdt.ui.javadoc=true
|
||||
|
||||
@ -139,6 +139,7 @@ fetcher.ping.ttl=TTL
|
||||
fetcher.hostname=Hostname
|
||||
fetcher.ports=Ports
|
||||
fetcher.ports.filtered=Filtered Ports
|
||||
fetcher.comment=Comments
|
||||
fetcher.value.ms= ms
|
||||
fetcher.value.notAvailable=[n/a]
|
||||
fetcher.value.notScanned=[n/s]
|
||||
|
||||
@ -20,7 +20,7 @@ public class CommentFetcher implements Fetcher {
|
||||
* @see net.azib.ipscan.fetchers.Fetcher#getLabel()
|
||||
*/
|
||||
public String getLabel() {
|
||||
return "fetcher.ip";
|
||||
return "fetcher.comment";
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -52,14 +52,15 @@ public class FetcherRegistryImpl implements FetcherRegistry {
|
||||
}
|
||||
|
||||
public int getSelectedFetcherIndex(String label) {
|
||||
int index = -1;
|
||||
int index = 0;
|
||||
for (Iterator i = selectedFetchers.values().iterator(); i.hasNext();) {
|
||||
if (((Fetcher)i.next()).getLabel().equals(label))
|
||||
break;
|
||||
Fetcher fetcher = (Fetcher)i.next();
|
||||
if (fetcher.getLabel().equals(label)) {
|
||||
return index;
|
||||
}
|
||||
index++;
|
||||
|
||||
}
|
||||
return index;
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void updateSelectedFetchers(String[] labels) {
|
||||
|
||||
@ -1,51 +0,0 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package net.azib.ipscan.gui.feeders;
|
||||
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
|
||||
import net.azib.ipscan.feeders.Feeder;
|
||||
import net.azib.ipscan.feeders.RangeFeeder;
|
||||
import junit.framework.TestCase;
|
||||
|
||||
/**
|
||||
* AbstractFeederGUITest
|
||||
*
|
||||
* @author anton
|
||||
*/
|
||||
public class AbstractFeederGUITest extends TestCase {
|
||||
|
||||
private AbstractFeederGUI feederGUI;
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
feederGUI = new AbstractFeederGUI(new Shell()) {
|
||||
|
||||
protected void initialize() {
|
||||
}
|
||||
|
||||
public String getFeederName() {
|
||||
return "Mega Feeder";
|
||||
}
|
||||
|
||||
public Feeder getFeeder() {
|
||||
feeder = new RangeFeeder();
|
||||
feeder.initialize(new String[] {"127.0.0.1", "127.0.0.2"});
|
||||
return feeder;
|
||||
}
|
||||
|
||||
public String serialize() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public void unserialize(String serialized) {
|
||||
}
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
public void testGetInfo() {
|
||||
assertEquals("Mega Feeder: 127.0.0.1 - 127.0.0.2", feederGUI.getInfo());
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user