Exemplo n.º 1
0
        public void OnDeploymentTaskStarting_DoNothing_SoDoesNotThrow()
        {
            var deploymentRequestRepository = new Mock<IDeploymentRequestRepository>();
              var auditingModule = new AuditingModule(deploymentRequestRepository.Object);

              var environmentInfoRepository = new Mock<IEnvironmentInfoRepository>();
              var artifactsRepository = new Mock<IArtifactsRepository>();
              TerminalAppProjectInfo projectInfo = new TerminalAppProjectInfo("name", "artifactsRepositoryName", "artifactsrepositoryDirName", false, "terminalAppName", "terminalAppDirName", "terminalAppExeName");
              var deploymentTask = new DeployTerminalAppDeploymentTask(environmentInfoRepository.Object, artifactsRepository.Object, projectInfo, "Production", "buildId", "prod");
              var deploymentContext = new DeploymentContext("requester");

              Assert.DoesNotThrow(() => auditingModule.OnDeploymentTaskStarting(deploymentTask, deploymentContext));
        }
Exemplo n.º 2
0
        public void OnDeploymentTaskStarting_DoNothing_SoDoesNotThrow()
        {
            var deploymentRequestRepository = new Mock<IDeploymentRequestRepository>();
              var auditingModule = new AuditingModule(deploymentRequestRepository.Object);

              var projectsInfoRepository = new Mock<IProjectInfoRepository>();
              var environmentInfoRepository = new Mock<IEnvironmentInfoRepository>();
              var artifactsRepository = new Mock<IArtifactsRepository>();
              var directoryAdapter = new Mock<IDirectoryAdapter>();
              var fileAdapter = new Mock<IFileAdapter>();
              var zipFileAdapter = new Mock<IZipFileAdapter>();
              var deploymentTask = new DeployTerminalAppDeploymentTask(projectsInfoRepository.Object, environmentInfoRepository.Object, artifactsRepository.Object, directoryAdapter.Object, fileAdapter.Object, zipFileAdapter.Object);
              var deploymentContext = new DeploymentContext("requester");

              DeploymentInfo deploymentInfo = DeploymentInfoGenerator.GetTerminalAppDeploymentInfo();

              Assert.DoesNotThrow(() => auditingModule.OnDeploymentTaskStarting(deploymentInfo, deploymentTask, deploymentContext));
        }