public void PublishToBothSymbolServerTest() { var publishTask = new PublishArtifactsInManifestV3(); var feedConfigsForSymbols = new HashSet <TargetFeedConfig>(); feedConfigsForSymbols.Add(new TargetFeedConfig( TargetFeedContentType.Symbols, "testUrl", FeedType.AzureStorageFeed, SymWebToken, string.Empty, AssetSelection.All, isolated: true, @internal: false, allowOverwrite: true, SymbolTargetType.SymWeb)); feedConfigsForSymbols.Add(new TargetFeedConfig( TargetFeedContentType.Symbols, TargetUrl, FeedType.AzDoNugetFeed, MsdlToken, string.Empty, AssetSelection.All, isolated: true, @internal: false, allowOverwrite: true, SymbolTargetType.Msdl)); Dictionary <string, string> test = publishTask.GetTargetSymbolServers(feedConfigsForSymbols, MsdlToken, SymWebToken); Assert.True( test.ContainsKey(Msdl)); Assert.True(test.ContainsKey(SymWeb)); Assert.True(test.Count == 2); }
public void PublishToSymbolServersTest(SymbolTargetType symbolTargetType, string symbolServer) { var publishTask = new PublishArtifactsInManifestV3(); var feedConfigsForSymbols = new HashSet <TargetFeedConfig>(); feedConfigsForSymbols.Add(new TargetFeedConfig( TargetFeedContentType.Symbols, "TargetUrl", FeedType.AzureStorageFeed, MsdlToken, new List <string>(), AssetSelection.All, isolated: true, @internal: false, allowOverwrite: true, symbolTargetType)); Dictionary <string, string> test = publishTask.GetTargetSymbolServers(feedConfigsForSymbols, MsdlToken, SymWebToken); Assert.True( test.ContainsKey(symbolServer)); Assert.True(test.Count == 1); }
public void PublishSymbolApiIsCalledTest() { var publishTask = new PublishArtifactsInManifestV3(); var path = TestInputs.GetFullPath("Symbols"); string[] fileEntries = Directory.GetFiles(path); var feedConfigsForSymbols = new HashSet <TargetFeedConfig>(); feedConfigsForSymbols.Add(new TargetFeedConfig( TargetFeedContentType.Symbols, TargetUrl, FeedType.AzureStorageFeed, SymWebToken, string.Empty, AssetSelection.All, isolated: true, @internal: false, allowOverwrite: true, SymbolTargetType.SymWeb)); Dictionary <string, string> test = publishTask.GetTargetSymbolServers(feedConfigsForSymbols, MsdlToken, SymWebToken); Assert.True(PublishSymbolsHelper.PublishAsync(null, path, SymWebToken, fileEntries, fileEntries, null, 365, false, false, null, false, false, false).IsCompleted); }