ListRooms() public method

Returns the list of available rooms as XML/JSON
public ListRooms ( ) : string
return string
Esempio n. 1
0
 public void TestListRoomsAsJson()
 {
     var client = new HipChat.HipChatClient(defaultClient.Token, HipChat.HipChatClient.ApiResponseFormat.JSON);
     var json = client.ListRooms();
     // not the most scientific test, but it's sunday night
     Assert.IsTrue(json.Contains("{"));
 }
Esempio n. 2
0
 public void TestListRoomsAsXml()
 {
     var client = new HipChat.HipChatClient(defaultClient.Token, HipChat.HipChatClient.ApiResponseFormat.XML);
     var xml = client.ListRooms();
     // not the most scientific test, but it's sunday night
     Assert.IsTrue(xml.StartsWith("<?xml version=\"1.0\" encoding=\"utf-8\"?>"));
 }
Esempio n. 3
0
        public void TestListRoomsAsXml()
        {
            var client = new HipChat.HipChatClient(defaultClient.Token, HipChat.HipChatClient.ApiResponseFormat.XML);
            var xml    = client.ListRooms();

            // not the most scientific test, but it's sunday night
            Assert.IsTrue(xml.StartsWith("<?xml version=\"1.0\" encoding=\"utf-8\"?>"));
        }
Esempio n. 4
0
        public void TestListRoomsAsJson()
        {
            var client = new HipChat.HipChatClient(defaultClient.Token, HipChat.HipChatClient.ApiResponseFormat.JSON);
            var json   = client.ListRooms();

            // not the most scientific test, but it's sunday night
            Assert.IsTrue(json.Contains("{"));
        }
Esempio n. 5
0
 public void TestAuthenticationException()
 {
     var client = new HipChatClient(){Token="XYZ", RoomId=123};
     client.ListRooms();
 }