Ejemplo n.º 1
0
        public void MarkMessageAsRead_WithId_ReturnsTrueWhenSuccessful()
        {
            // Arrange
            Guid id = Guid.NewGuid();

            RestResource resource = new InboxMessagesResource(id, InboxMessageStatus.Read);

            RestResponse response = new RestResponse()
            {
                StatusCode = HttpStatusCode.OK
            };

            mockRestClient
            .Setup(rc => rc.Put(resource))
            .Returns(response);

            // Act
            bool actualResult = service.MarkMessageAsRead(id);

            // Assert
            Assert.IsTrue(actualResult);
        }