public void ShouldNotSupportDeleteContactMessage()
        {
            // Act.
            Action action = () => _repository.Delete(TestUserId);

            // Assert.
            action.ShouldThrow <NotSupportedException>();
        }
Пример #2
0
        public void DeleteContactMessage(string contactId)
        {
            Guid contactIdGuid = Guid.Empty;

            if (!Guid.TryParse(contactId, out contactIdGuid))
            {
                throw new Exception("Invalid Guid Format");
            }
            var contactMessage = contactMessageRepository.GetById(contactIdGuid);

            contactMessageRepository.Delete(contactMessage);
        }