-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Denis Ivanov
committed
Apr 1, 2024
1 parent
b966996
commit ef4eeb4
Showing
4 changed files
with
394 additions
and
396 deletions.
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
35 changes: 17 additions & 18 deletions
35
AngleSharp.ContentExtraction.IntegrationTests/ContentExtractorTests.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 |
---|---|---|
@@ -1,27 +1,26 @@ | ||
using System.Threading.Tasks; | ||
using AngleSharp.Html.Dom; | ||
using NUnit.Framework; | ||
using System.Threading.Tasks; | ||
|
||
namespace AngleSharp.ContentExtraction.IntegrationTests; | ||
|
||
namespace AngleSharp.ContentExtraction.IntegrationTests | ||
[TestFixture] | ||
public class ContentExtractorTests | ||
{ | ||
[TestFixture] | ||
public class ContentExtractorTests | ||
[Test] | ||
public async Task Extract_IntegrationTest() | ||
{ | ||
[Test] | ||
public async Task Extract_IntegrationTest() | ||
{ | ||
// Arrange | ||
var config = Configuration.Default.WithDefaultLoader(); | ||
var address = "https://lenta.ru/articles/2020/05/13/coronausa/"; | ||
var context = BrowsingContext.New(config); | ||
var document = (IHtmlDocument)await context.OpenAsync(address); | ||
var extractor = new ContentExtractor(); | ||
// Arrange | ||
var config = Configuration.Default.WithDefaultLoader(); | ||
const string address = "https://lenta.ru/articles/2020/05/13/coronausa/"; | ||
var context = BrowsingContext.New(config); | ||
var document = (IHtmlDocument)await context.OpenAsync(address); | ||
var extractor = new ContentExtractor(); | ||
|
||
// Act | ||
extractor.Extract(document); | ||
// Act | ||
extractor.Extract(document); | ||
|
||
// Assert | ||
Assert.Pass(); | ||
} | ||
// Assert | ||
Assert.Pass(); | ||
} | ||
} |
10 changes: 5 additions & 5 deletions
10
AngleSharp.ContentExtraction/AngleSharp.ContentExtraction.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
Oops, something went wrong.