mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-14 01:25:40 -05:00
Or Filtering on Object Explorer Nodes (#1608)
support for a more robust filtering system in the Object Explorer xml, allowing for or-ing filter properties together for use in URN querying for objects Co-authored-by: Charles Gagnon <chgagnon@microsoft.com>
This commit is contained in:
@@ -9,6 +9,7 @@ using Microsoft.SqlServer.Management.Smo;
|
||||
using Microsoft.SqlTools.Extensibility;
|
||||
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer;
|
||||
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.SmoModel;
|
||||
using Microsoft.SqlTools.ServiceLayer.ObjectExplorer.Nodes;
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ObjectExplorer
|
||||
@@ -77,7 +78,8 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.ObjectExplorer
|
||||
var tableFactory = new TableValuedFunctionsChildFactory();
|
||||
var filters = tableFactory.Filters;
|
||||
Assert.True(filters.ToList().Any(filter => {
|
||||
return filter.Values.Contains(UserDefinedFunctionType.Table) && filter.Values.Contains(UserDefinedFunctionType.Inline);
|
||||
var f = filter as NodePropertyFilter;
|
||||
return f.Values.Contains(UserDefinedFunctionType.Table) && f.Values.Contains(UserDefinedFunctionType.Inline);
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user