From f5421a89655ba3acf0351ed79d4c9a6bfcdcf200 Mon Sep 17 00:00:00 2001 From: Michael Ganss Date: Wed, 18 Jul 2018 14:03:10 +0200 Subject: [PATCH] Use coverlet instead of OpenCover Target netcoreapp2.0 --- appveyor.yml | 3 +-- .../HtmlSanitizer.Tests.csproj | 15 +++++++-------- test/HtmlSanitizer.Tests/Tests.cs | 2 +- 3 files changed, 9 insertions(+), 11 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 45cc502..9dba34e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,8 +14,7 @@ build_script: - dotnet pack --include-symbols --include-source -c Release src\HtmlSanitizer test_script: - dotnet test test\HtmlSanitizer.Tests\HtmlSanitizer.Tests.csproj - - nuget.exe install OpenCover -ExcludeVersion - - OpenCover\tools\OpenCover.Console.exe -register:user -filter:"+[HtmlSanitizer]*" -target:"C:\Program Files\dotnet\dotnet.exe" "-targetargs:test test\HtmlSanitizer.Tests\HtmlSanitizer.Tests.csproj" -returntargetcode -hideskipped:All -output:coverage.xml + - dotnet test /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput="..\..\coverage.xml" test\HtmlSanitizer.Tests\HtmlSanitizer.Tests.csproj -f netcoreapp2.0 - "SET PATH=C:\\Python34;C:\\Python34\\Scripts;%PATH%" - pip install codecov - codecov -f "coverage.xml" diff --git a/test/HtmlSanitizer.Tests/HtmlSanitizer.Tests.csproj b/test/HtmlSanitizer.Tests/HtmlSanitizer.Tests.csproj index 6b6a194..4706b79 100644 --- a/test/HtmlSanitizer.Tests/HtmlSanitizer.Tests.csproj +++ b/test/HtmlSanitizer.Tests/HtmlSanitizer.Tests.csproj @@ -1,12 +1,10 @@  - netcoreapp1.0;net452 + netcoreapp2.0;net452 HtmlSanitizer.Tests HtmlSanitizer.Tests true - $(PackageTargetFallback);dnxcore50;portable-net45+win8 - 1.0.4 false false false @@ -21,13 +19,14 @@ - - - - + + + + + - + diff --git a/test/HtmlSanitizer.Tests/Tests.cs b/test/HtmlSanitizer.Tests/Tests.cs index ea81823..9879276 100644 --- a/test/HtmlSanitizer.Tests/Tests.cs +++ b/test/HtmlSanitizer.Tests/Tests.cs @@ -3001,7 +3001,7 @@ zqy1QY1kkPOuMvKWvvmFIwClI2393jVVcp91eda4+J+fIYDbfJa7RY5YcNrZhTuV//9k=""> var sanitizer = new HtmlSanitizer(); sanitizer.PostProcessNode += (s, e) => { - Assert.Equal(1, e.Document.Body.ChildNodes.Count()); + Assert.Single(e.Document.Body.ChildNodes); var text = e.Node as IText; Assert.NotNull(text); Assert.Equal("Test1Test2", text.NodeValue);