-
Notifications
You must be signed in to change notification settings - Fork 386
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added coverlet.tests.projectsample.wpf5.tests
- Loading branch information
Showing
9 changed files
with
101 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// Copyright (c) Toni Solarin-Sodara | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.Reflection; | ||
|
||
[assembly: AssemblyKeyFile("coverlet.tests.projectsample.wpf5.tests.snk")] |
38 changes: 38 additions & 0 deletions
38
test/coverlet.tests.projectsample.wpf5.tests/ResolverTests.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright (c) Toni Solarin-Sodara | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using Coverlet.Core.Abstractions; | ||
using Coverlet.Core.Instrumentation; | ||
using Microsoft.Extensions.DependencyModel; | ||
using Moq; | ||
using Xunit; | ||
|
||
namespace coverlet.tests.projectsample.wpf5.tests | ||
{ | ||
public class ResolverTests | ||
{ | ||
[Fact] | ||
public void TestInstrument_NetCoreSharedFrameworkResolver() | ||
{ | ||
Assembly assembly = GetType().Assembly; | ||
var mockLogger = new Mock<ILogger>(); | ||
var resolver = new NetCoreSharedFrameworkResolver(assembly.Location, mockLogger.Object); | ||
var compilationLibrary = new CompilationLibrary( | ||
"package", | ||
"System.Drawing", | ||
"5.0.17.0", | ||
"sha512-B2WqEox8o+4KUOpL7rZPyh6qYjik8tHi2tN8Z9jZkHzED8ElYgZa/h6K+xliB435SqUcWT290Fr2aa8BtZjn8A==", | ||
Enumerable.Empty<string>(), | ||
Enumerable.Empty<Dependency>(), | ||
true); | ||
|
||
var assemblies = new List<string>(); | ||
Assert.True(resolver.TryResolveAssemblyPaths(compilationLibrary, assemblies), | ||
"sample assembly shall be resolved"); | ||
Assert.NotEmpty(assemblies); | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
test/coverlet.tests.projectsample.wpf5.tests/coverlet.tests.projectsample.wpf5.tests.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5.0-windows</TargetFramework> | ||
<IsPackable>false</IsPackable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NET.Test.Sdk" /> | ||
<PackageReference Include="Moq" /> | ||
<PackageReference Include="xunit" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\src\coverlet.core\coverlet.core.csproj" /> | ||
<ProjectReference Include="..\coverlet.tests.projectsample.wpf5\coverlet.tests.projectsample.wpf5.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Binary file added
BIN
+596 Bytes
test/coverlet.tests.projectsample.wpf5.tests/coverlet.tests.projectsample.wpf5.tests.snk
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// Copyright (c) Toni Solarin-Sodara | ||
// Licensed under the MIT license. See LICENSE file in the project root for full license information. | ||
|
||
using System.Windows.Controls; | ||
|
||
namespace coverlet.tests.projectsample.wpf5 | ||
{ | ||
public class TestClass | ||
{ | ||
public UserControl Control { get; set; } | ||
} | ||
} |
9 changes: 9 additions & 0 deletions
9
test/coverlet.tests.projectsample.wpf5/coverlet.tests.projectsample.wpf5.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>net5.0-windows</TargetFramework> | ||
<UseWpf>true</UseWpf> | ||
<IsTestProject>false</IsTestProject> | ||
</PropertyGroup> | ||
|
||
</Project> |