2 * To change this template, choose Tools | Templates
3 * and open the template in the editor.
6 import java
.util
.logging
.Level
;
7 import java
.util
.logging
.Logger
;
8 import net
.bionicmessage
.groupdav
.GroupDAVObject
;
9 import org
.junit
.After
;
10 import org
.junit
.AfterClass
;
11 import org
.junit
.Before
;
12 import org
.junit
.BeforeClass
;
13 import org
.junit
.Test
;
14 import static org
.junit
.Assert
.*;
16 import net
.bionicmessage
.groupdav
.groupDAV
;
22 public class groupdavTest
{
24 public groupdavTest() {
28 public static void setUpClass() throws Exception
{
32 public static void tearDownClass() throws Exception
{
40 public void tearDown() {
43 /** Basic test, non-DAV to check setup. */
45 public void testSetupAndHTTPGet() throws Exception
{
46 groupDAV gdav
= new groupDAV("http://comalies.citadel.org",
49 GroupDAVObject index
= gdav
.getObject("http://comalies.citadel.org/");
52 public void testSetupAndHTTPSGet() throws Exception
{
53 groupDAV gdav
= new groupDAV("https://www.godaddy.com",
56 GroupDAVObject index
= gdav
.getObject("http://www.godaddy.com/");
59 public void testBuildPropFind() throws Exception
{
60 groupDAV gdav
= new groupDAV("http://comalies.citadel.org",
63 byte[] propFind
= gdav
.buildPROPFIND("/groupdav/Calendar");
64 String result
= new String(propFind
, "UTF-8");
65 System
.out
.println(result
);
68 public void testDoHavePort() throws Exception
{
69 groupDAV gdav
= new groupDAV("http://comalies.citadel.org:2000",
72 byte[] propFind
= gdav
.buildPROPFIND("/groupdav/Calendar");
73 String result
= new String(propFind
, "UTF-8");
74 assertTrue(result
.contains("comalies.citadel.org:2000"));