public void BinariesDirPath_returns_path_with_config_template_name_when_artifacts_are_env_specific() { // arrange var environmentInfo = DeploymentDataGenerator.GetEnvironmentInfo(); NtServiceProjectInfo projectInfo = ProjectInfoGenerator.GetNtServiceProjectInfo(areEnvironmentSpecific: true); _directoryAdapterFake.Setup(x => x.Exists(It.IsAny <string>())) .Returns(true); _deploymentStep = new ExtractArtifactsDeploymentStep( projectInfo, environmentInfo, _deploymentInfo, _ArtifactsFilePath, _TargetArtifactsDirPath, _fileAdapterFake.Object, _directoryAdapterFake.Object, _zipFileAdapterFake.Object); _deploymentStep.Prepare(); // act, assert Assert.IsTrue(_deploymentStep.BinariesDirPath.Contains(environmentInfo.ConfigurationTemplateName)); }
public void BinariesDirPath_fails_when_extracted_binaries_dir_doesnt_exist() { // arrange NtServiceProjectInfo projectInfo = ProjectInfoGenerator.GetNtServiceProjectInfo(areEnvironmentSpecific: false); _directoryAdapterFake.Setup(x => x.Exists(It.IsAny <string>())) .Returns(false); _deploymentStep = new ExtractArtifactsDeploymentStep( projectInfo, _environmentInfo, _deploymentInfo, _ArtifactsFilePath, _TargetArtifactsDirPath, _fileAdapterFake.Object, _directoryAdapterFake.Object, _zipFileAdapterFake.Object); _deploymentStep.Prepare(); // act assert Assert.Throws <DeploymentTaskException>( () => { string binPath = _deploymentStep.BinariesDirPath; }); }
public void Description_is_not_empty() { // arrange _deploymentStep.Prepare(); // act, assert Assert.IsNotNullOrEmpty(_deploymentStep.Description); }