CreateRoom() public method

public CreateRoom ( CreateRoomRequest request ) : HipchatCreateRoomResponse
request CreateRoomRequest
return HipchatCreateRoomResponse
Ejemplo n.º 1
0
        public SendRoomNotification()
        {
            HipchatApiConfig.AuthToken = TestsConfig.AuthToken;
            _client = new HipchatClient();
            _existingRoomId = _client.CreateRoom("Send Notification Test Room").Id;

        }
Ejemplo n.º 2
0
        public GetAllWebhooksTests()
        {
            HipchatApiConfig.AuthToken = TestsConfig.AuthToken;
            _client = new HipchatClient();

            var room = _client.CreateRoom("Test Webhooks Room");
            _existingRoomId = room.Id;
        }
Ejemplo n.º 3
0
        public void CanCreateRoom()
        {
            IHipchatClient client = new HipchatClient();

            var result = client.CreateRoom(RoomName);

            Assert.NotNull(result);
            Assert.NotNull(result.Links);
            Assert.NotNull(result.Links.Self);
        }
Ejemplo n.º 4
0
        public GetRoomTests()
        {
            const string roomName = "Test GetRooms";
            HipchatApiConfig.AuthToken = TestsConfig.AuthToken;
            _client = new HipchatClient();

            var room = _client.CreateRoom(roomName);
            _existingRoomId = room.Id;
            _existingRoomName = "Test GetRooms";
        }
Ejemplo n.º 5
0
        public UpdateRoomTests()
        {
            HipchatApiConfig.AuthToken = TestsConfig.AuthToken;
            _client = new HipchatClient();
            var room = _client.CreateRoom("TestUpdateRoom");
            _createdRoomId = room.Id;

            var getRoomResponse = _client.GetRoom(_createdRoomId);
            _owner = getRoomResponse.Owner;
        }
Ejemplo n.º 6
0
        public void CanDeleteRoom()
        {
            const string testRoomName = "Delete Me";
            var client = new HipchatClient();
            client.CreateRoom(testRoomName);

            var result = client.DeleteRoom(testRoomName);

            Assert.True(result);
        }
Ejemplo n.º 7
0
 public static int GetARoomId(HipchatClient client, string roomName)
 {
     try
     {
         var room = client.GetRoom(roomName);
         return room.Id;
     }
     catch (HipchatRoomNotFoundException)
     {
         var room = client.CreateRoom(roomName);
         return room.Id;
     }
 }
        public ViewRoomHistoryTests()
        {
            const string roomName = "Test ViewRoomHistory";
            HipchatApiConfig.AuthToken = TestsConfig.AuthToken;
            _client = new HipchatClient();

            var room = _client.CreateRoom(roomName);
            _existingRoomId = room.Id;
            _existingRoomName = "Test ViewRoomHistory";

            // Add notifications to history
            _client.SendNotification(_existingRoomId, "First entry to history");
            _client.ShareFileWithRoom(_existingRoomId.ToString(), @"..\..\Data\RUv8sSn.png", "Second entry to history with file");
        }
Ejemplo n.º 9
0
        public GetAllWebhooksTests()
        {
            HipchatApiConfig.AuthToken = TestsConfig.AuthToken;
            _client = new HipchatClient();

            try
            {
                var existingRoom = _client.GetRoom("Test Webhooks Room");
                _existingRoomId = existingRoom.Id;
            }
            catch (Exception)
            {
                 var room = _client.CreateRoom("Test Webhooks Room");
                _existingRoomId = room.Id;
            }
        }