Renames ShowPlan directories along with corresponding namespaces (#1435)

* Renames ShowPlan directories along with corresponding namespaces

* Renames ShowPlanGraphUtils to ExecutionPlanGraphUtils

* Revert "Renames ShowPlanGraphUtils to ExecutionPlanGraphUtils"

This reverts commit 5dc2696ae906598447eed7360a3f342218432b83.

* Reverts show plan tests name change.

* Renames show plan test XML files.

* Renames ported directory to ShowPlan and updates namespace accordingly
This commit is contained in:
Lewis Sanchez
2022-03-21 16:25:44 -07:00
committed by GitHub
parent a5c8fd4c53
commit f7b37091ca
57 changed files with 64 additions and 70 deletions

View File

@@ -5,7 +5,7 @@
using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
{
/// <summary>
/// Execution plan graph object that is sent over JSON RPC

View File

@@ -6,7 +6,7 @@
using System.Collections.Generic;
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
{
public class GetExecutionPlanParams
{

View File

@@ -8,7 +8,7 @@ using System.Threading.Tasks;
using Microsoft.SqlTools.Hosting.Protocol;
using Microsoft.SqlTools.ServiceLayer.Hosting;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
{
/// <summary>
/// Main class for Migration Service functionality

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Builds hierarchy of Graph objects from SQL 2000 Actual ShowPlan Record Set

View File

@@ -8,7 +8,7 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
#region FloatTypeConverter

View File

@@ -6,7 +6,7 @@
using System.Collections.Generic;
using System.Linq;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph.Comparison
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan.Comparison
{
/// <summary>
/// Handles operations for creating and comparing skeletons of showplan trees

View File

@@ -5,7 +5,7 @@
using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph.Comparison
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan.Comparison
{
public class SkeletonNode
{

View File

@@ -5,7 +5,7 @@
using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
internal sealed class ConditionParser : XmlPlanHierarchyParser
{

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
public class Constants
{

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Parses StmtCursorType ShowPlan XML nodes

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Parses StmtCursorType ShowPlan XML nodes

View File

@@ -11,7 +11,7 @@ using System.Diagnostics;
using System.Globalization;
using System.Text.RegularExpressions;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Base class for building hierarchy of Graph objects from ShowPlan Record Set

View File

@@ -6,7 +6,7 @@
using System;
using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
public class Description
{

View File

@@ -7,7 +7,7 @@ using System;
using System.ComponentModel;
using System.Globalization;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
public class Edge
{

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Builds hierarchy of Graph objects from SQL 2000 Estimated ShowPlan Record Set

View File

@@ -8,7 +8,7 @@ using System.Collections;
using System.Globalization;
using System.Text;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
public class ExpandableArrayWrapper : ExpandableObjectWrapper

View File

@@ -6,7 +6,7 @@
using System;
using System.ComponentModel;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
public class ExpandableObjectWrapper : ObjectParser, ICustomTypeDescriptor
{

View File

@@ -6,7 +6,7 @@
using System.ComponentModel;
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Parses ShowPlan XML objects derived from RelOpBaseType type

View File

@@ -5,7 +5,7 @@
using System.ComponentModel;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
internal sealed class FunctionTypeParser : XmlPlanParser
{

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
public class Graph
{

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Interface represents an abstract builder that gets

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Interface represents ability to split an data source containing multiple

View File

@@ -6,7 +6,7 @@
using System.ComponentModel;
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Parses ShowPlan XML objects derived from RelOpBaseType type

View File

@@ -6,7 +6,7 @@
using System.ComponentModel;
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Parses ShowPlan XML objects derived from RelOpBaseType type

View File

@@ -9,7 +9,7 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Status of operator

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
public class NodeBuilderContext
{

View File

@@ -7,7 +7,7 @@ using System;
using System.Data;
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Class that creates concrete INodeBuilder instances.

View File

@@ -7,7 +7,7 @@ using System;
using System.ComponentModel;
using System.Collections;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Base class for all object / Node parsers

View File

@@ -13,7 +13,7 @@ using System.Reflection;
using System.Text;
using System.Xml;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// This class converts methods for converting from ShowPlanXML native classes

View File

@@ -6,7 +6,7 @@
using System;
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
public sealed class Operation
{

View File

@@ -8,7 +8,7 @@ using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// A class that holds information about a physical or logical operator, or a statement.

View File

@@ -9,7 +9,7 @@ using System.Xml.Serialization;
using System.Reflection;
using System.Collections;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// PropertyFactory creates properties based on template properties (this class public properties)

View File

@@ -7,7 +7,7 @@ using System;
using System.Collections;
using System.ComponentModel;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
internal sealed class PropertyValue : PropertyDescriptor
{

View File

@@ -6,7 +6,7 @@
using System.ComponentModel;
using System.Collections;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Parses ShowPlan XML objects derived from RelOpBaseType type

View File

@@ -10,7 +10,7 @@ using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
internal sealed class RelOpTypeParser : XmlPlanParser
{

View File

@@ -8,7 +8,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Globalization;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// RunTimeCounters class stores RunTimeCountersPerThread information

View File

@@ -7,7 +7,7 @@ using System;
using System.Collections.Generic;
using System.Globalization;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Parses stytement type ShowPlan XML nodes

View File

@@ -5,7 +5,7 @@
using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
internal class XmlPlanHierarchyParser : XmlPlanParser
{

View File

@@ -13,7 +13,7 @@ using System.Text;
using System.Xml.Serialization;
using System.Reflection;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Builds hierarchy of Graph objects from ShowPlan XML

View File

@@ -9,7 +9,7 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Class for enumerating FunctionType objects

View File

@@ -5,7 +5,7 @@
using System;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
internal static class XmlPlanParserFactory
{

View File

@@ -3,7 +3,7 @@
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// A class that lists String constants common to XML Show Plan Node Parsing

View File

@@ -6,7 +6,7 @@
using System;
using System.Collections.Generic;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan
{
/// <summary>
/// Extension of graph with some handy included methods specific for ShowPlan use

View File

@@ -16,7 +16,7 @@
//
// This source code was auto-generated by xsd, Version=4.8.3928.0.
//
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph {
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan {
using System.Xml.Serialization;

View File

@@ -7,17 +7,17 @@ using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using Microsoft.SqlTools.ServiceLayer.ShowPlan.ShowPlanGraph;
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan.ShowPlan;
using Microsoft.SqlTools.Utility;
using System.Diagnostics;
namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
namespace Microsoft.SqlTools.ServiceLayer.ExecutionPlan
{
public class ShowPlanGraphUtils
{
public static List<ExecutionPlanGraph> CreateShowPlanGraph(string xml, string fileName)
{
ShowPlanGraph.ShowPlanGraph[] graphs = ShowPlanGraph.ShowPlanGraph.ParseShowPlanXML(xml, ShowPlanGraph.ShowPlanType.Unknown);
ShowPlan.ShowPlanGraph[] graphs = ShowPlan.ShowPlanGraph.ParseShowPlanXML(xml, ShowPlan.ShowPlanType.Unknown);
return graphs.Select(g => new ExecutionPlanGraph
{
Root = ConvertShowPlanTreeToExecutionPlanTree(g.Root),
@@ -96,7 +96,7 @@ namespace Microsoft.SqlTools.ServiceLayer.ShowPlan
return propsList;
}
private static List<ExecutionPlanRecommendation> ParseRecommendations(ShowPlanGraph.ShowPlanGraph g, string fileName)
private static List<ExecutionPlanRecommendation> ParseRecommendations(ShowPlan.ShowPlanGraph g, string fileName)
{
return g.Description.MissingIndices.Select(mi => new ExecutionPlanRecommendation
{

View File

@@ -166,8 +166,8 @@ namespace Microsoft.SqlTools.ServiceLayer
InitializeHostedServices(serviceProvider, serviceHost);
serviceHost.ServiceProvider = serviceProvider;
ShowPlan.ExecutionPlanService.Instance.InitializeService(serviceHost);
serviceProvider.RegisterSingleService(ShowPlan.ExecutionPlanService.Instance);
ExecutionPlan.ExecutionPlanService.Instance.InitializeService(serviceHost);
serviceProvider.RegisterSingleService(ExecutionPlan.ExecutionPlanService.Instance);
serviceHost.InitializeRequestHandlers();
}

View File

@@ -572,7 +572,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
/// </summary>
/// <param name="resultSetIndex">The index for selecting the result set</param>
/// <returns>An execution plan object</returns>
public Task<ExecutionPlan> GetExecutionPlan(int resultSetIndex)
public Task<Contracts.ExecutionPlan> GetExecutionPlan(int resultSetIndex)
{
ResultSet targetResultSet;
lock (resultSets)

View File

@@ -5,7 +5,7 @@
using System.Collections.Generic;
using Microsoft.SqlTools.Hosting.Protocol.Contracts;
using Microsoft.SqlTools.ServiceLayer.ShowPlan;
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan;
namespace Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteRequests
{

View File

@@ -353,7 +353,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
/// <param name="batchIndex">The index for selecting the batch item</param>
/// <param name="resultSetIndex">The index for selecting the result set</param>
/// <returns>The Execution Plan, if the result set has one</returns>
public Task<ExecutionPlan> GetExecutionPlan(int batchIndex, int resultSetIndex)
public Task<Contracts.ExecutionPlan> GetExecutionPlan(int batchIndex, int resultSetIndex)
{
// Sanity check to make sure that the batch is within bounds
if (batchIndex < 0 || batchIndex >= Batches.Length)

View File

@@ -16,7 +16,7 @@ using Microsoft.SqlTools.ServiceLayer.Hosting;
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts.ExecuteRequests;
using Microsoft.SqlTools.ServiceLayer.QueryExecution.Contracts;
using Microsoft.SqlTools.ServiceLayer.QueryExecution.DataStorage;
using Microsoft.SqlTools.ServiceLayer.ShowPlan;
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan;
using Microsoft.SqlTools.ServiceLayer.SqlContext;
using Microsoft.SqlTools.ServiceLayer.Workspace.Contracts;
using Microsoft.SqlTools.ServiceLayer.Workspace;

View File

@@ -309,7 +309,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
/// Generates the execution plan from the table returned
/// </summary>
/// <returns>An execution plan object</returns>
public Task<ExecutionPlan> GetExecutionPlan()
public Task<Contracts.ExecutionPlan> GetExecutionPlan()
{
// Process the action just in case it hasn't been yet
ProcessSpecialAction();
@@ -342,7 +342,7 @@ namespace Microsoft.SqlTools.ServiceLayer.QueryExecution
}
}
return new ExecutionPlan
return new Contracts.ExecutionPlan
{
Format = format,
Content = content

View File

@@ -31,10 +31,9 @@
</ItemGroup>
<ItemGroup>
<Content Remove=".\ShowPlan\TestExecution.xml" />
<EmbeddedResource Include=".\ShowPlan\TestExecutionPlan.xml" />
<EmbeddedResource Include="ShowPlan\TestShowPlan.xml" />
</ItemGroup>
<ItemGroup>
<Content Remove=".\ShowPlan\TestExecutionPlanRecommendations.xml" />
<EmbeddedResource Include=".\ShowPlan\TestExecutionPlanRecommendations.xml" />
<EmbeddedResource Include="ShowPlan\TestShowPlanRecommendations.xml" />
</ItemGroup>
</Project>

View File

@@ -30,7 +30,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution
// If:
// ... I have a result set and I ask for a valid execution plan
ResultSet planResultSet = b.ResultSets.First();
ExecutionPlan plan = planResultSet.GetExecutionPlan().Result;
ServiceLayer.QueryExecution.Contracts.ExecutionPlan plan = planResultSet.GetExecutionPlan().Result;
Assert.AreEqual("xml", plan.Format);
Assert.That(plan.Content, Does.Contain("Execution Plan"), "I should get the execution plan back");
}
@@ -62,7 +62,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.QueryExecution
Batch b = Common.GetExecutedBatchWithExecutionPlan();
// ... And I ask for a valid execution plan
ExecutionPlan plan = b.GetExecutionPlan(0).Result;
ServiceLayer.QueryExecution.Contracts.ExecutionPlan plan = b.GetExecutionPlan(0).Result;
Assert.AreEqual("xml", plan.Format);
Assert.That(plan.Content, Does.Contain("Execution Plan"), "I should get the execution plan back");

View File

@@ -4,16 +4,11 @@
//
using System;
//
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
//
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using NUnit.Framework;
using Microsoft.SqlTools.ServiceLayer.ShowPlan;
using Microsoft.SqlTools.ServiceLayer.ExecutionPlan;
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
@@ -25,7 +20,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
[Test]
public void ParseXMLFileReturnsValidShowPlanGraph()
{
ReadFile(".ShowPlan.TestExecutionPlan.xml");
ReadFile(".ShowPlan.TestShowPlan.xml");
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
Assert.AreEqual(1, showPlanGraphs.Count, "exactly one show plan graph should be returned");
Assert.NotNull(showPlanGraphs[0], "graph should not be null");
@@ -35,7 +30,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
[Test]
public void ParsingNestedProperties()
{
ReadFile(".ShowPlan.TestExecutionPlan.xml");
ReadFile(".ShowPlan.TestShowPlan.xml");
string[] commonNestedPropertiesNames = { "MemoryGrantInfo", "OptimizerHardwareDependentProperties" };
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
ExecutionPlanNode rootNode = showPlanGraphs[0].Root;
@@ -52,7 +47,7 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ShowPlan
public void ParseXMLFileWithRecommendations()
{
//The first graph in this execution plan has 3 recommendations
ReadFile(".ShowPlan.TestExecutionPlanRecommendations.xml");
ReadFile(".ShowPlan.TestShowPlanRecommendations.xml");
string[] commonNestedPropertiesNames = { "MemoryGrantInfo", "OptimizerHardwareDependentProperties" };
var showPlanGraphs = ShowPlanGraphUtils.CreateShowPlanGraph(queryPlanFileText, "testFile.sql");
List<ExecutionPlanRecommendation> rootNode = showPlanGraphs[0].Recommendations;