Exemple #1
0
        public async Task ParseTreatmentMetaWithCatalogueOfLifeCommand_RunWithValidDocumentAndValidProgramSettings_ShouldCallParserWithCorrectParameter()
        {
            // Arrange
            var parserMock   = new Mock <ITreatmentMetaParserWithDataService <ICatalogueOfLifeTaxaClassificationResolver> >();
            var command      = new ParseTreatmentMetaWithCatalogueOfLifeCommand(parserMock.Object);
            var settingsMock = new Mock <ICommandSettings>();
            var documentMock = new Mock <IDocument>();

            // Act
            var result = await command.Run(documentMock.Object, settingsMock.Object);

            // Assert
            parserMock.Verify(p => p.Parse(It.IsAny <IDocument>()), Times.Once);
            parserMock.Verify(p => p.Parse(documentMock.Object), Times.Once);
        }