public void ExtractorConfigValidate_NoPropertiesSet_MissingParameterException() { var extractorConfig = new ExtractorConfig(); var expectedException = Assert.Throws <ArgumentException>(() => extractorConfig.Validate()); Assert.Contains("Missing parameter", expectedException.Message); }
public void ExtractorConfigValidate_MinimumPropertiesSet_IsValid() { var extractorConfig = new ExtractorConfig { sourceApimName = "source-apim", destinationApimName = "destination-apim", resourceGroup = "resource-group", fileFolder = "c:/my/folder" }; extractorConfig.Validate(); }
public void ExtractorConfigValidate_VerifyNotSupportedCases_ThrowsException(string splitApis, string apiVersionSetName, string apiName, string includeAllRevisions, string multipleApis) { var extractorConfig = new ExtractorConfig { sourceApimName = "source-apim", destinationApimName = "destination-apim", resourceGroup = "resource-group", fileFolder = "c:/my/folder", splitAPIs = splitApis, apiName = apiName, apiVersionSetName = apiVersionSetName, includeAllRevisions = includeAllRevisions, mutipleAPIs = multipleApis }; Assert.Throws <NotSupportedException>(() => extractorConfig.Validate()); }