Inheritance: IPublishConfigurationFactory
        public void GetPublishConfiguration_ParameterAreValid_ResultContainsParametersAsTheyWerePassedIn(string publishLocation, string configurationName, string apiKey)
        {
            // Arrange
            var publishConfigurationFactory = new PublishConfigurationFactory();

            // Act
            var result = publishConfigurationFactory.GetPublishConfiguration(configurationName, publishLocation, apiKey);

            // Assert
            Assert.AreEqual(publishLocation, result.PublishLocation);
            Assert.AreEqual(configurationName, result.Name);
            Assert.AreEqual(apiKey, result.ApiKey);
        }
        public void GetPublishConfiguration_PublishLocationParameterIsInvalid_ResultIsNull(string publishLocation)
        {
            // Arrange
            string configurationName = "Nuget.org";
            string apiKey = null;

            var publishConfigurationFactory = new PublishConfigurationFactory();

            // Act
            var result = publishConfigurationFactory.GetPublishConfiguration(configurationName, publishLocation, apiKey);

            // Assert
            Assert.IsNull(result);
        }
        public void GetPublishConfiguration_ParameterAreValid_ResultIsNotNull(string apiKey)
        {
            // Arrange
            string publishLocation = "Nuget.org";
            string configurationName = "http://nuget.org/api/v2";

            var publishConfigurationFactory = new PublishConfigurationFactory();

            // Act
            var result = publishConfigurationFactory.GetPublishConfiguration(configurationName, publishLocation, apiKey);

            // Assert
            Assert.IsNotNull(result);
        }
        public void Setup()
        {
            this.applicationInformation = ApplicationInformationProvider.GetApplicationInformation();
            IEncodingProvider encodingProvider = new DefaultFileEncodingProvider();
            IFilesystemAccessor filesystemAccessor = new PhysicalFilesystemAccessor(encodingProvider);
            IPackageServerFactory packageServerFactory = new PackageServerFactory();
            IPublishConfigurationFactory publishConfigurationFactory = new PublishConfigurationFactory();
            IObjectSerializer<PublishConfiguration[]> publishConfigurationSerializer = new JSONObjectSerializer<PublishConfiguration[]>();
            IFilesystemPersistence<PublishConfiguration[]> publishConfigurationPersistence = new FilesystemPersistence<PublishConfiguration[]>(filesystemAccessor, publishConfigurationSerializer);
            this.publishConfigurationAccessor = new ConfigFilePublishConfigurationAccessor(this.applicationInformation, publishConfigurationFactory, publishConfigurationPersistence);

            this.publishingService = new PublishingService(filesystemAccessor, packageServerFactory, this.publishConfigurationAccessor);

            this.localPublishingFolder = Path.Combine(this.applicationInformation.StartupFolder, "publish-target");
            this.samplePackageFilepath = Path.Combine(this.applicationInformation.StartupFolder, "IntegrationTests", "Publishing", SamplePackageFilename);
        }