Ejemplo n.º 1
0
 private async Task UpDockerComposeFile(string dockerComposeFileName)
 {
     _fullDockerComposeFilePath = Path.Combine(CollectionFolder, dockerComposeFileName);
     //var upProjectCommand = new UpProjectCommand(_fullDockerComposeFilePath);
     var upProjectCommand = UpProjectCommand.WithFiles(_fullDockerComposeFilePath).Build();
     await upProjectCommand.Execute(TimeSpan.FromSeconds(10));
 }
Ejemplo n.º 2
0
 public async Task ShouldAcceptUpProjectCommand()
 {
     await TestBasicCommandUsage(
         "up --detach",
         (files, starter) => UpProjectCommand
         .WithFilesAndStarter(starter, files)
         .Build());
 }
Ejemplo n.º 3
0
        private static void ValidateOptions(
            Func <UpProjectCommandBuilder, UpProjectCommandBuilder> configure,
            Func <string, bool> validateOptions)
        {
            var    processStarterMock = new Mock <IProcessStarter>();
            var    builder            = UpProjectCommand.WithFilesAndStarter(processStarterMock.Object, "file1", "file2");
            Action build = () => configure(builder).Build();

            build.Should().ThrowExactly <CommandBuildException>()
            .Which.Errors.Should().Contain(error => validateOptions(error));
        }