From 311e2c89458a68bd7a56103830f70ae1fd316c10 Mon Sep 17 00:00:00 2001 From: Egil Hansen Date: Sat, 14 Oct 2023 10:21:48 +0000 Subject: [PATCH] chore: remove old anglesharpwrappers.tests project --- bunit.sln | 7 ---- .../AngleSharpWrappers.Tests.csproj | 13 -------- .../GlobalSuppressions.cs | 7 ---- tests/AngleSharpWrappers.Tests/HtmlParser.cs | 32 ------------------- tests/AngleSharpWrappers.Tests/TestFactory.cs | 17 ---------- 5 files changed, 76 deletions(-) delete mode 100644 tests/AngleSharpWrappers.Tests/AngleSharpWrappers.Tests.csproj delete mode 100644 tests/AngleSharpWrappers.Tests/GlobalSuppressions.cs delete mode 100644 tests/AngleSharpWrappers.Tests/HtmlParser.cs delete mode 100644 tests/AngleSharpWrappers.Tests/TestFactory.cs diff --git a/bunit.sln b/bunit.sln index 83f11976e..915f3555e 100644 --- a/bunit.sln +++ b/bunit.sln @@ -66,8 +66,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "bunit.benchmarks.assets", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AngleSharpWrappers", "src\AngleSharpWrappers\AngleSharpWrappers.csproj", "{ABB3F046-0297-491A-9106-7948403BE0DE}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AngleSharpWrappers.Tests", "tests\AngleSharpWrappers.Tests\AngleSharpWrappers.Tests.csproj", "{BE6B6206-E32F-4AFC-BAB4-AEC5E8A7F16B}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -110,10 +108,6 @@ Global {ABB3F046-0297-491A-9106-7948403BE0DE}.Debug|Any CPU.Build.0 = Debug|Any CPU {ABB3F046-0297-491A-9106-7948403BE0DE}.Release|Any CPU.ActiveCfg = Release|Any CPU {ABB3F046-0297-491A-9106-7948403BE0DE}.Release|Any CPU.Build.0 = Release|Any CPU - {BE6B6206-E32F-4AFC-BAB4-AEC5E8A7F16B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {BE6B6206-E32F-4AFC-BAB4-AEC5E8A7F16B}.Debug|Any CPU.Build.0 = Debug|Any CPU - {BE6B6206-E32F-4AFC-BAB4-AEC5E8A7F16B}.Release|Any CPU.ActiveCfg = Release|Any CPU - {BE6B6206-E32F-4AFC-BAB4-AEC5E8A7F16B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -129,7 +123,6 @@ Global {9F7A0623-8294-4A5D-946F-70C481732AA5} = {F6084D31-2A92-4794-A47E-A8F2254E6970} {3619481F-DF6F-4399-9FED-450EE545A19E} = {F6084D31-2A92-4794-A47E-A8F2254E6970} {ABB3F046-0297-491A-9106-7948403BE0DE} = {9A2B3B34-D41C-43E8-BC7D-246BEBE48D59} - {BE6B6206-E32F-4AFC-BAB4-AEC5E8A7F16B} = {6EA09ED4-B714-4E6F-B0E1-4D987F8AE520} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {24106918-1C86-4769-BDA6-9C80E64CD260} diff --git a/tests/AngleSharpWrappers.Tests/AngleSharpWrappers.Tests.csproj b/tests/AngleSharpWrappers.Tests/AngleSharpWrappers.Tests.csproj deleted file mode 100644 index dfa8b4417..000000000 --- a/tests/AngleSharpWrappers.Tests/AngleSharpWrappers.Tests.csproj +++ /dev/null @@ -1,13 +0,0 @@ - - - - netcoreapp3.1;net5.0;net6.0;net7.0;net8.0 - AngleSharpWrappers - AngleSharpWrappers.Tests - - - - - - - diff --git a/tests/AngleSharpWrappers.Tests/GlobalSuppressions.cs b/tests/AngleSharpWrappers.Tests/GlobalSuppressions.cs deleted file mode 100644 index f39935b0e..000000000 --- a/tests/AngleSharpWrappers.Tests/GlobalSuppressions.cs +++ /dev/null @@ -1,7 +0,0 @@ -// This file is used by Code Analysis to maintain SuppressMessage -// attributes that are applied to this project. -// Project-level suppressions either have no target or are given -// a specific target and scoped to a namespace, type, member, etc. - -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "")] -[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Usage", "xUnit1013:Public method should be marked as test", Justification = "")] diff --git a/tests/AngleSharpWrappers.Tests/HtmlParser.cs b/tests/AngleSharpWrappers.Tests/HtmlParser.cs deleted file mode 100644 index 29afb96b2..000000000 --- a/tests/AngleSharpWrappers.Tests/HtmlParser.cs +++ /dev/null @@ -1,32 +0,0 @@ -using AngleSharp; -using AngleSharp.Dom; -using AngleSharp.Html.Parser; - -namespace AngleSharpWrappers -{ - public sealed class HtmlParser : IDisposable - { - private readonly IBrowsingContext _context; - private readonly IHtmlParser _htmlParser; - private readonly IDocument _document; - - public HtmlParser() - { - var config = Configuration.Default; - _context = BrowsingContext.New(config); - _htmlParser = _context.GetService()!; - _document = _context.OpenNewAsync().Result; - } - - public INodeList Parse(string? html) - { - return _htmlParser.ParseFragment(html ?? string.Empty, _document.Body!); - } - - public void Dispose() - { - _context.Dispose(); - _document.Dispose(); - } - } -} diff --git a/tests/AngleSharpWrappers.Tests/TestFactory.cs b/tests/AngleSharpWrappers.Tests/TestFactory.cs deleted file mode 100644 index 3157897dd..000000000 --- a/tests/AngleSharpWrappers.Tests/TestFactory.cs +++ /dev/null @@ -1,17 +0,0 @@ -using AngleSharp.Dom; - -namespace AngleSharpWrappers -{ - public class TestFactory : IElementFactory - where T : class, IElement - { - private readonly Func _factory; - - public TestFactory(Func factory) - { - _factory = factory; - } - - public T GetElement() => _factory(); - } -}