Fixed unit tests after combining User32 and User32.Gdi

pull/83/head
David Hall 2019-08-27 16:40:45 -06:00
parent 6b8e0ccf58
commit 4bfc2c06cd
9 changed files with 16 additions and 397 deletions

View File

@ -1 +0,0 @@
See details for [Vanara.PInvoke.User32](https://github.com/dahall/Vanara/blob/master/PInvoke/User32/CorrelationReport.md)

View File

@ -1,75 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>PInvoke API (methods, structures and constants) imported from Windows User32.dll and specific to graphics or window management.</Description>
<Copyright>Copyright © 2017-2019</Copyright>
<AssemblyTitle>$(AssemblyName)</AssemblyTitle>
<VersionPrefix>3.0.0</VersionPrefix>
<TargetFrameworks>net20;net35;net40;net45;netstandard2.0;netcoreapp2.0;netcoreapp2.1</TargetFrameworks>
<AssemblyName>Vanara.PInvoke.User32.Gdi</AssemblyName>
<PackageId>$(AssemblyName)</PackageId>
<RootNamespace>Vanara.PInvoke</RootNamespace>
<Authors>David Hall</Authors>
<PackageProjectUrl>https://github.com/dahall/vanara</PackageProjectUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageIconUrl>https://raw.githubusercontent.com/dahall/Vanara/master/docs/icons/Vanara48x48.png</PackageIconUrl>
<RepositoryUrl>https://github.com/dahall/vanara</RepositoryUrl>
<RepositoryType>Git</RepositoryType>
<PackageTags>pinvoke;vanara;net-extensions;interop</PackageTags>
<NeutralLanguage>en-US</NeutralLanguage>
<IncludeSource>true</IncludeSource>
<IncludeSymbols>true</IncludeSymbols>
<Company>GitHub Community</Company>
<Product>Vanara</Product>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<PackageReleaseNotes>Currently implements:
Functions
CallNextHookEx, ChildWindowFromPointEx, DestroyIcon, DrawTextA, DrawTextW, ExitWindowsEx, GetActiveWindow, GetClientRect, GetIconInfo, GetWindowLongA, GetWindowLongPtrA, GetWindowLongPtrW, GetWindowLongW, GetWindowRect, InvalidateRect, LoadImageA, LoadImageW, LoadStringA, LoadStringW, LockWorkStation, MapWindowPoints, RealGetWindowClassA, RealGetWindowClassW, RegisterHotKey, RegisterWindowMessageA, RegisterWindowMessageW, ScreenToClient, SendMessageA, SendMessageW, SetWindowPos, SetWindowsHookExA, SetWindowsHookExW, SetWindowTextA, SetWindowTextW, ShutdownBlockReasonCreate, ShutdownBlockReasonDestroy, ShutdownBlockReasonQuery, UnhookWindowsHookEx, UnregisterHotKey, WindowFromPoint
Structures
ICONINFO, NMHDR, MINMAXINFO, WINDOWPOS, GRPICONDIR, GRPICONDIRENTRY
</PackageReleaseNotes>
<LangVersion>latest</LangVersion>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\..\Vanara.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'">
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<DocumentationFile>bin\$(Configuration)\$(TargetFramework)\$(AssemblyName).xml</DocumentationFile>
</PropertyGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net20' ">
<Reference Include="System" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net35' ">
<Reference Include="System" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net40' ">
<Reference Include="System" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetFramework)' == 'net45' ">
<Reference Include="System" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Core\Vanara.Core.csproj" />
<ProjectReference Include="..\Gdi32\Vanara.PInvoke.Gdi32.csproj" />
<ProjectReference Include="..\Kernel32\Vanara.PInvoke.Kernel32.csproj" />
<ProjectReference Include="..\Shared\Vanara.PInvoke.Shared.csproj" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="System.Drawing.Common">
<Version>4.5.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.1'">
<PackageReference Include="System.Drawing.Common">
<Version>4.5.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp2.0'">
<PackageReference Include="System.Drawing.Common">
<Version>4.5.1</Version>
</PackageReference>
</ItemGroup>
</Project>

View File

@ -59,6 +59,10 @@
<Project>{a5e519e9-feba-4fe3-93a5-b8269bef72f4}</Project>
<Name>Vanara.PInvoke.Shared</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\PInvoke\User32\Vanara.PInvoke.User32.csproj">
<Project>{a6771907-addc-49fc-8444-a97aa65e77e2}</Project>
<Name>Vanara.PInvoke.User32</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.

View File

@ -59,6 +59,10 @@
<Project>{3226020f-4c9d-41b3-ac8a-2bc9fd064cd8}</Project>
<Name>Vanara.PInvoke.Shell32</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\PInvoke\User32\Vanara.PInvoke.User32.csproj">
<Project>{a6771907-addc-49fc-8444-a97aa65e77e2}</Project>
<Name>Vanara.PInvoke.User32</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit">

View File

@ -1,70 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="16.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{C5BF48D8-4E84-4900-96A0-03B38E23D7A3}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>User32.Gdi</RootNamespace>
<AssemblyName>User32.Gdi</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit">
<Version>3.12.0</Version>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter">
<Version>3.13.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="User32GdiTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Core\Vanara.Core.csproj">
<Project>{241f73ee-9298-45c9-b869-a045dff94c03}</Project>
<Name>Vanara.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\PInvoke\Gdi32\Vanara.PInvoke.Gdi32.csproj">
<Project>{e186aff0-bc70-4776-8bee-9fdae108f4eb}</Project>
<Name>Vanara.PInvoke.Gdi32</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\PInvoke\Shared\Vanara.PInvoke.Shared.csproj">
<Project>{a5e519e9-feba-4fe3-93a5-b8269bef72f4}</Project>
<Name>Vanara.PInvoke.Shared</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -32,6 +32,7 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Drawing" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit">
@ -42,6 +43,7 @@
</PackageReference>
</ItemGroup>
<ItemGroup>
<Compile Include="User32GdiTests.cs" />
<Compile Include="User32Tests.cs" />
</ItemGroup>
<ItemGroup>
@ -49,6 +51,10 @@
<Project>{241f73ee-9298-45c9-b869-a045dff94c03}</Project>
<Name>Vanara.Core</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\PInvoke\Gdi32\Vanara.PInvoke.Gdi32.csproj">
<Project>{e186aff0-bc70-4776-8bee-9fdae108f4eb}</Project>
<Name>Vanara.PInvoke.Gdi32</Name>
</ProjectReference>
<ProjectReference Include="..\..\..\PInvoke\Kernel32\Vanara.PInvoke.Kernel32.csproj">
<Project>{842d436f-598c-47d7-b5aa-12399f8ccfe9}</Project>
<Name>Vanara.PInvoke.Kernel32</Name>

View File

@ -9,7 +9,7 @@ using static Vanara.PInvoke.User32;
namespace Vanara.PInvoke.Tests
{
[TestFixture()]
public class User32Tests
public partial class User32Tests
{
[Test()]
public void CallNextHookExTest()
@ -90,227 +90,5 @@ namespace Vanara.PInvoke.Tests
Assert.That(GetDisplayAutoRotationPreferences(out var o));
Assert.That(o, Is.EqualTo(ORIENTATION_PREFERENCE.ORIENTATION_PREFERENCE_NONE));
}
[Test()]
public void GetWindowLongTest()
{
throw new NotImplementedException();
}
[Test()]
public void GetWindowLong32Test()
{
throw new NotImplementedException();
}
[Test()]
public void GetWindowLongPtrTest()
{
throw new NotImplementedException();
}
[Test()]
public void LockWorkStationTest()
{
throw new NotImplementedException();
}
[Test()]
public void RealGetWindowClassTest()
{
throw new NotImplementedException();
}
[Test()]
public void RegisterHotKeyTest()
{
throw new NotImplementedException();
}
[Test()]
public void RegisterWindowMessageTest()
{
throw new NotImplementedException();
}
[Test()]
public void ScreenToClientTest()
{
throw new NotImplementedException();
}
[Test()]
public void SendMessageTest()
{
throw new NotImplementedException();
}
[Test()]
public void SendMessageTest1()
{
throw new NotImplementedException();
}
[Test()]
public void SendMessageTest2()
{
throw new NotImplementedException();
}
[Test()]
public void SendMessageTest3()
{
throw new NotImplementedException();
}
[Test()]
public void SendMessageTest4()
{
throw new NotImplementedException();
}
[Test()]
public void SendMessageTest5()
{
throw new NotImplementedException();
}
[Test()]
public void SetWindowLongTest()
{
throw new NotImplementedException();
}
[Test()]
public void SetWindowPosTest()
{
throw new NotImplementedException();
}
[Test()]
public void SetWindowTextTest()
{
throw new NotImplementedException();
}
[Test()]
public void ShutdownBlockReasonCreateTest()
{
throw new NotImplementedException();
}
[Test()]
public void ShutdownBlockReasonDestroyTest()
{
throw new NotImplementedException();
}
[Test()]
public void ShutdownBlockReasonQueryTest()
{
throw new NotImplementedException();
}
[Test()]
public void ShutdownBlockReasonQueryTest1()
{
throw new NotImplementedException();
}
[Test()]
public void UnhookWindowsHookExTest()
{
throw new NotImplementedException();
}
[Test()]
public void UnregisterHotKeyTest()
{
throw new NotImplementedException();
}
[Test()]
public void WindowFromPointTest()
{
throw new NotImplementedException();
}
[Test()]
public void ExitWindowsExTest()
{
throw new NotImplementedException();
}
[Test()]
public void DrawTextTest()
{
throw new NotImplementedException();
}
[Test()]
public void GetClientRectTest()
{
throw new NotImplementedException();
}
[Test()]
public void GetWindowRectTest()
{
throw new NotImplementedException();
}
[Test()]
public void InvalidateRectTest()
{
throw new NotImplementedException();
}
[Test()]
public void MapWindowPointsTest()
{
throw new NotImplementedException();
}
[Test()]
public void MapWindowPointsTest1()
{
throw new NotImplementedException();
}
[Test()]
public void MapWindowPointsTest2()
{
throw new NotImplementedException();
}
[Test()]
public void SendMessageTest6()
{
throw new NotImplementedException();
}
[Test()]
public void LoadImageTest()
{
throw new NotImplementedException();
}
[Test()]
public void LoadStringTest()
{
throw new NotImplementedException();
}
[Test()]
public void LoadStringTest1()
{
throw new NotImplementedException();
}
[Test()]
public void SetWindowsHookExTest()
{
throw new NotImplementedException();
}
}
}

View File

@ -4,31 +4,12 @@ using System.Linq;
using System.Runtime.InteropServices;
using Vanara.InteropServices;
using static Vanara.PInvoke.User32;
using static Vanara.PInvoke.User32;
namespace Vanara.PInvoke.Tests
{
[TestFixture()]
public class User32Tests
public partial class User32Tests
{
[Test()]
public void CallNextHookExTest()
{
throw new NotImplementedException();
}
[Test()]
public void ChildWindowFromPointExTest()
{
throw new NotImplementedException();
}
[Test()]
public void DestroyIconTest()
{
throw new NotImplementedException();
}
[Test]
public void GetGestureConfigTest()
{

View File

@ -143,8 +143,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TaskSchd", "UnitTests\PInvo
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "User32", "UnitTests\PInvoke\User32\User32.csproj", "{60A80A72-67BD-4CC2-95DA-0F6D3553A221}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "User32.Gdi", "UnitTests\PInvoke\User32.Gdi\User32.Gdi.csproj", "{C5BF48D8-4E84-4900-96A0-03B38E23D7A3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UxTheme", "UnitTests\PInvoke\UxTheme\UxTheme.csproj", "{EFAFBD16-A9FB-4656-896D-AD434B778EF0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "VirtDisk", "UnitTests\PInvoke\VirtDisk\VirtDisk.csproj", "{6947F255-E176-409C-9788-9C02A68C9D3B}"
@ -505,11 +503,6 @@ Global
{60A80A72-67BD-4CC2-95DA-0F6D3553A221}.Debug|Any CPU.Build.0 = Debug|Any CPU
{60A80A72-67BD-4CC2-95DA-0F6D3553A221}.Release|Any CPU.ActiveCfg = Release|Any CPU
{60A80A72-67BD-4CC2-95DA-0F6D3553A221}.Release|Any CPU.Build.0 = Release|Any CPU
{C5BF48D8-4E84-4900-96A0-03B38E23D7A3}.Debug (no Unit Tests)|Any CPU.ActiveCfg = Debug|Any CPU
{C5BF48D8-4E84-4900-96A0-03B38E23D7A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5BF48D8-4E84-4900-96A0-03B38E23D7A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5BF48D8-4E84-4900-96A0-03B38E23D7A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5BF48D8-4E84-4900-96A0-03B38E23D7A3}.Release|Any CPU.Build.0 = Release|Any CPU
{EFAFBD16-A9FB-4656-896D-AD434B778EF0}.Debug (no Unit Tests)|Any CPU.ActiveCfg = Debug|Any CPU
{EFAFBD16-A9FB-4656-896D-AD434B778EF0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EFAFBD16-A9FB-4656-896D-AD434B778EF0}.Debug|Any CPU.Build.0 = Debug|Any CPU
@ -620,7 +613,6 @@ Global
{AF867D8E-1C94-4D4C-962D-D155581B0C3B} = {385CAD2D-0A5E-4F80-927B-D5499D126B90}
{85157400-A6FF-41E7-B650-4952ECBC28AD} = {385CAD2D-0A5E-4F80-927B-D5499D126B90}
{60A80A72-67BD-4CC2-95DA-0F6D3553A221} = {385CAD2D-0A5E-4F80-927B-D5499D126B90}
{C5BF48D8-4E84-4900-96A0-03B38E23D7A3} = {385CAD2D-0A5E-4F80-927B-D5499D126B90}
{EFAFBD16-A9FB-4656-896D-AD434B778EF0} = {385CAD2D-0A5E-4F80-927B-D5499D126B90}
{6947F255-E176-409C-9788-9C02A68C9D3B} = {385CAD2D-0A5E-4F80-927B-D5499D126B90}
{A4BF5AA2-4D73-4BE7-ABB4-3DC089CFA77A} = {385CAD2D-0A5E-4F80-927B-D5499D126B90}