ListRooms() public method

Returns the list of available rooms as XML/JSON
public ListRooms ( ) : string
return string
Example #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("{"));
 }
Example #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\"?>"));
 }
Example #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\"?>"));
        }
Example #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("{"));
        }
Example #5
0
 public void TestAuthenticationException()
 {
     var client = new HipChatClient(){Token="XYZ", RoomId=123};
     client.ListRooms();
 }