public void BinariesDirPath_returns_path_without_config_template_name_when_artifacts_are_not_env_specific() { // arrange NtServiceProjectInfo projectInfo = ProjectInfoGenerator.GetNtServiceProjectInfo(areEnvironmentSpecific: false); _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.IsFalse(_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; }); }