Exemple #1
0
        public async Task DeletePresentation_ShouldReturnTrue()
        {
            // Arrange
            var queuePresentationAddedMock = new Mock <PresentationAddedQueue>();
            var queueScheduleAddedMock     = new Mock <PresentationScheduleAddedQueue>();
            var presentationRepositoryMock = new Mock <IPresentationRepository>();

            presentationRepositoryMock
            .Setup(presentationRepository => presentationRepository.DeletePresentationAsync(It.IsAny <int>()))
            .ReturnsAsync(true);
            var presentationManager = new PresentationManager(presentationRepositoryMock.Object,
                                                              queuePresentationAddedMock.Object, queueScheduleAddedMock.Object);

            // Act
            var deletedPresentation = await presentationManager.DeletePresentationAsync(1); // Any number

            // Assert
            Assert.True(deletedPresentation);
        }