Fixed the issue with nodeType set to null for many sql objects in object explorer (#323)

* Fixed the issue with nodeType set to null for sql objects
This commit is contained in:
Leila Lali
2017-04-19 15:49:00 -07:00
committed by GitHub
parent 850cf8c3e4
commit 3fd4129488
7 changed files with 201 additions and 106 deletions

View File

@@ -89,14 +89,13 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.ObjectExplorer
!node.NodePath.Contains("FileTables") && !node.NodePath.Contains("External Tables"))
{
var labaleToUpper = node.Label.ToUpper();
if (labaleToUpper.Contains("TABLE") || labaleToUpper.Contains("StoredProcedure")
|| labaleToUpper.Contains("VIEW"))
foreach (var child in children)
{
foreach (var child in children)
if (child.NodeType != "Folder")
{
if (child.NodeType != "Folder")
Assert.NotNull(child.NodeType);
if (child.Metadata != null && !string.IsNullOrEmpty(child.Metadata.MetadataTypeName))
{
Assert.NotNull(child.Metadata);
if (!string.IsNullOrEmpty(child.Metadata.Schema))
{
Assert.Equal($"{child.Metadata.Schema}.{child.Metadata.Name}", child.Label);
@@ -106,8 +105,11 @@ namespace Microsoft.SqlTools.ServiceLayer.IntegrationTests.ObjectExplorer
Assert.Equal(child.Metadata.Name, child.Label);
}
}
else
{
}
}
}
}
foreach (var child in children)