Esempio n. 1
0
        public async Task GenerateDockerfilesCommand_Validate_UpToDate()
        {
            using TempFolderContext tempFolderContext = TestHelper.UseTempFolder();
            GenerateDockerfilesCommand command = InitializeCommand(tempFolderContext, dockerfile: ExpectedDockerfile, validate: true);

            await command.ExecuteAsync();

            _environmentServiceMock.Verify(o => o.Exit(It.IsAny <int>()), Times.Never);
        }
Esempio n. 2
0
        public async Task GenerateDockerfilesCommand_Canonical()
        {
            using TempFolderContext tempFolderContext = TestHelper.UseTempFolder();
            GenerateDockerfilesCommand command = InitializeCommand(tempFolderContext);

            await command.ExecuteAsync();

            string generatedDockerfile = File.ReadAllText(Path.Combine(tempFolderContext.Path, DockerfilePath));

            Assert.Equal(ExpectedDockerfile.NormalizeLineEndings(generatedDockerfile), generatedDockerfile);
        }