public void AddingMessageWithInvalidRoomIdShouldFail()
        {
            var message = new CreateMessageBindingModels()
            {
                Text = "New message"
            };

            var httpResponse = this.controller.CreateMessage(5, message).ExecuteAsync(new CancellationToken()).Result;

            var serverResponse = httpResponse.Content.ReadAsStringAsync().Result;

            Assert.AreEqual("{\"Message\":\"Room doesn't exist\"}", serverResponse);

            Assert.AreEqual(HttpStatusCode.BadRequest, httpResponse.StatusCode);
        }
        public void AddingMessageShouldAddMessage()
        {
            var message = new CreateMessageBindingModels()
            {
                Text = "New message"
            };

            var expectedMessage = new MessageOutputModel()
            {
                Text = "New message",
                SentDate = DateTime.Now,
                Id = 4,
                RoomId = 1,
                PosterName = WebChatDataMock.MockedUserId
            };

            var httpResponse = this.controller.CreateMessage(1, message).ExecuteAsync(new CancellationToken()).Result;

            var serverResponse = httpResponse.Content.ReadAsStringAsync().Result;

            Assert.AreEqual(serverResponse, "\"Message successfully created\"");

            Assert.AreEqual(expectedMessage.Text, this.dataMock.Messages.GetAll().Last().Text);
        }