summaryrefslogtreecommitdiffstats
path: root/cobbler4j/src/org/fedorahosted/cobbler/test/FinderTests.java
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@rm-rf.ca>2009-11-02 16:33:35 -0400
committerDevan Goodwin <dgoodwin@rm-rf.ca>2009-11-02 16:33:35 -0400
commit6b224660b95f59b9008f1dd79231ba615e558029 (patch)
tree19665374055c87afe0ce162aff21d6cb70bf9d39 /cobbler4j/src/org/fedorahosted/cobbler/test/FinderTests.java
parent07cd6b33b40d47a624c32770e94de56ffda6d494 (diff)
downloadcobbler-6b224660b95f59b9008f1dd79231ba615e558029.tar.gz
cobbler-6b224660b95f59b9008f1dd79231ba615e558029.tar.xz
cobbler-6b224660b95f59b9008f1dd79231ba615e558029.zip
Move first test class into a subpackage.
Diffstat (limited to 'cobbler4j/src/org/fedorahosted/cobbler/test/FinderTests.java')
-rw-r--r--cobbler4j/src/org/fedorahosted/cobbler/test/FinderTests.java34
1 files changed, 34 insertions, 0 deletions
diff --git a/cobbler4j/src/org/fedorahosted/cobbler/test/FinderTests.java b/cobbler4j/src/org/fedorahosted/cobbler/test/FinderTests.java
new file mode 100644
index 00000000..46216b9e
--- /dev/null
+++ b/cobbler4j/src/org/fedorahosted/cobbler/test/FinderTests.java
@@ -0,0 +1,34 @@
+package org.fedorahosted.cobbler.test;
+
+import java.util.List;
+import org.junit.Test;
+import org.junit.BeforeClass;
+import static org.junit.Assert.*;
+
+import org.fedorahosted.cobbler.autogen.*;
+import org.fedorahosted.cobbler.*;
+
+public class FinderTests {
+
+ public static final String user = "testing";
+ public static final String pass = "testing";
+ public static CobblerConnection cobblercon;
+
+ @BeforeClass
+ public static void establishConnection() {
+ cobblercon = new CobblerConnection("http://192.168.1.1",
+ user, pass);
+ }
+
+ @Test
+ public void findSomething() {
+ Finder finder = Finder.getInstance();
+ // TODO: Will fail if your cobbler server has no distros:
+ List<Distro> d = (List<Distro>)finder.listItems(cobblercon,
+ ObjectType.DISTRO);
+
+ // Ideally we'd check that some were returned, but we can't guarantee
+ // the cobbler server we're testing against has any distro's available.
+ }
+
+}