PackageSolution() public method

public PackageSolution ( string solutionPath, string buildConfiguration, string>.KeyValuePair buildProperties ) : IServiceResult
solutionPath string
buildConfiguration string
buildProperties string>.KeyValuePair
return IServiceResult
        public void PackageSolution_BuildConfigurationParameterIsInvalid_ResultIsFalse(string buildConfiguration)
        {
            // Arrange
            var solutionBuilderMock = new Mock<ISolutionBuilder>();
            var prepackagingServiceMock = new Mock<IPrepackagingService>();
            var packagingServiceMock = new Mock<IPackagingService>();
            var buildFolderPathProvider = new Mock<IBuildFolderPathProvider>();
            buildFolderPathProvider.Setup(b => b.GetBuildFolderPath()).Returns("C:\\build");

            var solutionPackagingService = new SolutionPackagingService(solutionBuilderMock.Object, prepackagingServiceMock.Object, packagingServiceMock.Object, buildFolderPathProvider.Object);

            string solutionPath = @"C:\dev\someproject\some-solution.sln";
            var buildProperties = new[] { new KeyValuePair<string, string>("IsAutoBuild", "True") };

            // Act
            var result = solutionPackagingService.PackageSolution(solutionPath, buildConfiguration, buildProperties);

            // Assert
            Assert.AreEqual(ServiceResultType.Failure, result.Status);
        }
        public void PackageSolution_ParametersAreValid_BuildSucceeds_PrepackagingSucceeds_PackaginSucceeds_ResultIsTrue()
        {
            // Arrange
            string solutionPath = @"C:\dev\someproject\some-solution.sln";
            string buildConfiguration = "Debug";
            var buildProperties = new[] { new KeyValuePair<string, string>("IsAutoBuild", "True") };

            var solutionBuilderMock = new Mock<ISolutionBuilder>();
            solutionBuilderMock.Setup(b => b.Build(solutionPath, buildConfiguration, buildProperties)).Returns(new SuccessResult());

            var prepackagingServiceMock = new Mock<IPrepackagingService>();
            prepackagingServiceMock.Setup(p => p.Prepackage(It.IsAny<string>())).Returns(new SuccessResult());

            var packagingServiceMock = new Mock<IPackagingService>();
            packagingServiceMock.Setup(p => p.Package()).Returns(new SuccessResult());

            var buildFolderPathProvider = new Mock<IBuildFolderPathProvider>();
            buildFolderPathProvider.Setup(b => b.GetBuildFolderPath()).Returns("C:\\build");

            var solutionPackagingService = new SolutionPackagingService(solutionBuilderMock.Object, prepackagingServiceMock.Object, packagingServiceMock.Object, buildFolderPathProvider.Object);

            // Act
            var result = solutionPackagingService.PackageSolution(solutionPath, buildConfiguration, buildProperties);

            // Assert
            Assert.AreEqual(ServiceResultType.Success, result.Status);
        }