Exemplo n.º 1
0
        public async Task GetStages_always_shouldRetrieveStageFromBuilder()
        {
            // Arrange
            var stageBuilder        = new Mock <IStageBuilder>();
            var costStageRevisionId = Guid.NewGuid();

            _stageBuilders.Add(new Lazy <IStageBuilder, PluginMetadata>(
                                   () => stageBuilder.Object, new PluginMetadata {
                BuType = BuType.Pg
            }));

            // Act
            await _service.GetAllStages(BuType.Pg, costStageRevisionId);

            // Assert
            stageBuilder.Verify(b => b.GetStages(costStageRevisionId), Times.Once);
        }