Esempio n. 1
0
        public void MarkMessageAsUnread_WithId_ReturnsTrueWhenSuccessful()
        {
            // Arrange
            Guid id = Guid.NewGuid();

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

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

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

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

            // Assert
            Assert.IsTrue(actualResult);
        }