Exemplo n.º 1
0
        public async Task <GuideV1> DeleteGuideByIdAsync(string correlationId, string id)
        {
            var oldGuide = await _persistence.DeleteByIdAsync(correlationId, id);

            await _attachmentsConnector.RemoveAttachmentsAsync(correlationId, oldGuide);

            return(oldGuide);
        }
Exemplo n.º 2
0
        public async Task It_Should_Delete_Guide()
        {
            // arrange
            var guide = await _persistence.CreateAsync(null, TestModel.CreateGuide());

            // act
            var deletedGuide = await _persistence.DeleteByIdAsync(null, guide.Id);

            var result = await _persistence.GetByIdAsync(null, guide.Id);

            // assert
            TestModel.AssertEqual(guide, deletedGuide);
            Assert.Null(result);
        }