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);