Skip to content

Commit c6d1a9b

Browse files
authored
Add test coverage for public API surface of VirtualizationCacheLengthConverter (#10659)
1 parent 4c7a15d commit c6d1a9b

File tree

6 files changed

+379
-3
lines changed

6 files changed

+379
-3
lines changed

Microsoft.Dotnet.Wpf.sln

+15
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PresentationFramework.Fluen
384384
EndProject
385385
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Printing.Tests", "src\Microsoft.DotNet.Wpf\tests\UnitTests\System.Printing.Tests\System.Printing.Tests.csproj", "{762F6671-44CA-672D-B9C5-CFB69999F152}"
386386
EndProject
387+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PresentationFramework.Tests", "src\Microsoft.DotNet.Wpf\tests\UnitTests\PresentationFramework.Tests\PresentationFramework.Tests.csproj", "{33BA28FA-887A-45AE-BEC2-7254E0044DE0}"
388+
EndProject
387389
Global
388390
GlobalSection(SolutionConfigurationPlatforms) = preSolution
389391
Debug|arm64 = Debug|arm64
@@ -1668,6 +1670,18 @@ Global
16681670
{762F6671-44CA-672D-B9C5-CFB69999F152}.Release|x64.Build.0 = Release|x64
16691671
{762F6671-44CA-672D-B9C5-CFB69999F152}.Release|x86.ActiveCfg = Release|x86
16701672
{762F6671-44CA-672D-B9C5-CFB69999F152}.Release|x86.Build.0 = Release|x86
1673+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Debug|arm64.ActiveCfg = Debug|arm64
1674+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Debug|arm64.Build.0 = Debug|arm64
1675+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Debug|x64.ActiveCfg = Debug|x64
1676+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Debug|x64.Build.0 = Debug|x64
1677+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Debug|x86.ActiveCfg = Debug|x86
1678+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Debug|x86.Build.0 = Debug|x86
1679+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Release|arm64.ActiveCfg = Release|arm64
1680+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Release|arm64.Build.0 = Release|arm64
1681+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Release|x64.ActiveCfg = Release|x64
1682+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Release|x64.Build.0 = Release|x64
1683+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Release|x86.ActiveCfg = Release|x86
1684+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0}.Release|x86.Build.0 = Release|x86
16711685
EndGlobalSection
16721686
GlobalSection(SolutionProperties) = preSolution
16731687
HideSolutionNode = FALSE
@@ -1796,6 +1810,7 @@ Global
17961810
{0EFFC7C4-B486-4852-8CED-EDEB46E02C42} = {D0AED517-9972-41CB-8751-983E4EB8F511}
17971811
{56833D74-2D0B-5516-C1D6-B93D4FFF7612} = {A48B585E-6AB0-4F8D-8484-77F37CB44437}
17981812
{762F6671-44CA-672D-B9C5-CFB69999F152} = {A48B585E-6AB0-4F8D-8484-77F37CB44437}
1813+
{33BA28FA-887A-45AE-BEC2-7254E0044DE0} = {A48B585E-6AB0-4F8D-8484-77F37CB44437}
17991814
EndGlobalSection
18001815
GlobalSection(ExtensibilityGlobals) = postSolution
18011816
SolutionGuid = {B4340004-DAC0-497D-B69D-CFA7CD93F567}

src/Microsoft.DotNet.Wpf/tests/UnitTests/PresentationCore.Tests/System/Windows/Media/Imaging/BitmapImage.Tests.cs

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ public void Initialization_StreamSource_Invalid_ThrowsNotSupportedException()
3434
public void Initialization_StreamSource_PNG_Succeeds()
3535
{
3636
using MemoryStream stream = new(s_png120DPI1x1);
37-
3837
BitmapImage image = new BitmapImage();
3938

4039
// InitializeInit
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

4+
global using Xunit;
5+
46
global using System.Collections.Generic;
7+
global using System.Globalization;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<AssemblyName>PresentationFramework.Tests</AssemblyName>
5+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
6+
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
7+
<Nullable>enable</Nullable>
8+
<Platforms>x64;x86;arm64</Platforms>
9+
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
10+
<NoWarn>$(NoWarn)</NoWarn>
11+
<GenerateDocumentationFile>true</GenerateDocumentationFile>
12+
<TargetFramework Condition="!$(TargetFramework.Contains('windows'))">$(TargetFramework)-windows</TargetFramework>
13+
</PropertyGroup>
14+
15+
<ItemGroup>
16+
<ProjectReference Include="$(WpfSourceDir)DirectWriteForwarder\DirectWriteForwarder.vcxproj">
17+
<UndefineProperties>TargetFramework;TargetFrameworks</UndefineProperties>
18+
</ProjectReference>
19+
<ProjectReference Include="$(WpfSourceDir)PresentationCore\PresentationCore.csproj" />
20+
<ProjectReference Include="$(WpfSourceDir)PresentationFramework\PresentationFramework.csproj" />
21+
<ProjectReference Include="$(WpfSourceDir)WindowsBase\WindowsBase.csproj" />
22+
<ProjectReference Include="$(WpfSourceDir)System.Xaml\System.Xaml.csproj" />
23+
<ProjectReference Include="$(WpfSourceDir)Extensions\PresentationFramework-SystemDrawing\PresentationFramework-SystemDrawing.csproj" />
24+
</ItemGroup>
25+
26+
<ItemGroup>
27+
<MicrosoftPrivateWinFormsReference Include="System.Private.Windows.Core" />
28+
</ItemGroup>
29+
30+
<ItemGroup>
31+
<PackageReference Include="Moq" Version="$(MoqPackageVersion)" />
32+
<PackageReference Include="xunit.stafact" Version="$(XUnitStaFactPackageVersion)" />
33+
<PackageReference Include="FluentAssertions" Version="$(FluentAssertionsVersion)" />
34+
<PackageReference Include="System.Configuration.ConfigurationManager" Version="$(SystemConfigurationConfigurationManagerPackageVersion)" />
35+
<PackageReference Include="$(SystemIOPackagingPackage)" Version="$(SystemIOPackagingVersion)" />
36+
<PackageReference Include="System.Runtime.Serialization.Formatters" Version="$(SystemRuntimeSerializationFormattersPackageVersion)" />
37+
<PackageReference Include="$(SystemDrawingCommonPackage)" Version="$(SystemDrawingCommonVersion)" />
38+
<PackageReference Include="System.Private.Windows.Core.TestUtilities" Version="$(SystemPrivateWindowsCoreTestUtilitiesVersion)" />
39+
</ItemGroup>
40+
41+
</Project>

0 commit comments

Comments
 (0)