예제 #1
0
        public void GetContentStringEncoding_GivenNull_ThrowsArgumentNullException()
        {
            // Arrage
            var messageBody = new HttpMessageBody();

            // Act & Assert
            Assert.ThrowsException <ArgumentNullException>(() => messageBody.GetContentString(null));
        }
예제 #2
0
        public void GetContentString_SetContentToString_ReturnsTheSameString()
        {
            // Arrange
            var          messageBody = new HttpMessageBody();
            const string content     = "467y4higifgerhtthąśććąę123123";

            // Act
            messageBody.SetContent(content);

            // Assert
            Assert.AreEqual(content, messageBody.GetContentString());
        }