mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 04:07:40 +02:00
Merging with master
This commit is contained in:
@@ -132,14 +132,33 @@ namespace Wox.Test.Plugins
|
||||
_api.InitQueryHelper(out queryHelper, 10);
|
||||
_api.ModifyQueryHelper(ref queryHelper, "*");
|
||||
string keyword = "test";
|
||||
bool commandDisposed = false;
|
||||
bool resultDisposed = false;
|
||||
|
||||
// Act
|
||||
_api.ExecuteQuery(queryHelper, keyword);
|
||||
try
|
||||
{
|
||||
_api.command.ExecuteReader();
|
||||
}
|
||||
catch(InvalidOperationException)
|
||||
{
|
||||
commandDisposed = true;
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
_api.WDSResults.Read();
|
||||
}
|
||||
catch(InvalidOperationException)
|
||||
{
|
||||
resultDisposed = true;
|
||||
}
|
||||
|
||||
// Assert
|
||||
Assert.IsNull(_api.conn);
|
||||
Assert.IsNull(_api.command);
|
||||
Assert.IsNull(_api.WDSResults);
|
||||
Assert.IsTrue(_api.conn.State == System.Data.ConnectionState.Closed);
|
||||
Assert.IsTrue(commandDisposed);
|
||||
Assert.IsTrue(resultDisposed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,13 +48,12 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Moq" Version="4.13.1" />
|
||||
<PackageReference Include="nunit" Version="3.12.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
|
||||
<PackageReference Include="tlbimp-Microsoft.Search.Interop" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Properties\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
Reference in New Issue
Block a user