示例#1
0
        public void ExtractorConfigValidate_NoPropertiesSet_MissingParameterException()
        {
            var extractorConfig     = new ExtractorConsoleAppConfiguration();
            var extractorParameters = new ExtractorParameters(extractorConfig);

            var expectedException = Assert.Throws <ArgumentException>(() => extractorParameters.Validate());

            Assert.Contains("Missing parameter", expectedException.Message);
        }
示例#2
0
        public void ExtractorConfigValidate_MinimumPropertiesSet_IsValid()
        {
            var extractorConfig = new ExtractorConsoleAppConfiguration
            {
                SourceApimName      = "source-apim",
                DestinationApimName = "destination-apim",
                ResourceGroup       = "resource-group",
                FileFolder          = "c:/my/folder"
            };
            var extractorParameters = new ExtractorParameters(extractorConfig);

            extractorParameters.Validate();
        }
示例#3
0
        public void ExtractorConfigValidate_VerifyNotSupportedCases_ThrowsException(string splitApis, string apiVersionSetName, string apiName, string includeAllRevisions, string multipleApis)
        {
            var extractorConfig = new ExtractorConsoleAppConfiguration
            {
                SourceApimName      = "source-apim",
                DestinationApimName = "destination-apim",
                ResourceGroup       = "resource-group",
                FileFolder          = "c:/my/folder",
                SplitAPIs           = splitApis,
                ApiName             = apiName,
                ApiVersionSetName   = apiVersionSetName,
                IncludeAllRevisions = includeAllRevisions,
                MultipleAPIs        = multipleApis
            };
            var extractorParameters = new ExtractorParameters(extractorConfig);

            Assert.Throws <NotSupportedException>(() => extractorParameters.Validate());
        }