Skip to content

Commit 2b92e17

Browse files
HavenDVclaude
andcommitted
feat: Migrate docs to Examples/ metadata pattern
Move test examples to Examples/ directory with YAML front matter for autosdk docs sync. Remove legacy Tests.*.cs example files that have been superseded by the new Examples/ pattern. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 58ca05e commit 2b92e17

4 files changed

Lines changed: 42 additions & 20 deletions

File tree

File renamed without changes.

src/tests/IntegrationTests/Tests.MetadataDeserialization.cs renamed to src/tests/IntegrationTests/Examples/Metadata.Description.Array.cs

Lines changed: 6 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,13 @@
1+
/*
2+
order: 10
3+
title: Metadata Description Array
4+
slug: metadata-description-array
5+
*/
6+
17
namespace Firecrawl.IntegrationTests;
28

39
public partial class Tests
410
{
5-
[TestMethod]
6-
public void Metadata_Description_String()
7-
{
8-
var json = """
9-
{
10-
"title": "Test Page",
11-
"description": "A simple description",
12-
"sourceURL": "https://example.com"
13-
}
14-
""";
15-
16-
var metadata = System.Text.Json.JsonSerializer.Deserialize<ScrapeResponseDataMetadata>(
17-
json, SourceGenerationContext.Default.ScrapeResponseDataMetadata);
18-
19-
metadata.Should().NotBeNull();
20-
metadata!.Description.Should().NotBeNull();
21-
metadata.Description!.Value.IsValue1.Should().BeTrue();
22-
metadata.Description.Value.Value1.Should().Be("A simple description");
23-
}
24-
2511
[TestMethod]
2612
public void Metadata_Description_Array()
2713
{
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
/*
2+
order: 20
3+
title: Metadata Description String
4+
slug: metadata-description-string
5+
*/
6+
7+
namespace Firecrawl.IntegrationTests;
8+
9+
public partial class Tests
10+
{
11+
[TestMethod]
12+
public void Metadata_Description_String()
13+
{
14+
var json = """
15+
{
16+
"title": "Test Page",
17+
"description": "A simple description",
18+
"sourceURL": "https://example.com"
19+
}
20+
""";
21+
22+
var metadata = System.Text.Json.JsonSerializer.Deserialize<ScrapeResponseDataMetadata>(
23+
json, SourceGenerationContext.Default.ScrapeResponseDataMetadata);
24+
25+
metadata.Should().NotBeNull();
26+
metadata!.Description.Should().NotBeNull();
27+
metadata.Description!.Value.IsValue1.Should().BeTrue();
28+
metadata.Description.Value.Value1.Should().Be("A simple description");
29+
}
30+
}

src/tests/IntegrationTests/Tests.Scrape.cs renamed to src/tests/IntegrationTests/Examples/Scrape.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
/*
2+
order: 30
3+
title: Scrape
4+
slug: scrape
5+
*/
6+
17
namespace Firecrawl.IntegrationTests;
28

39
public partial class Tests

0 commit comments

Comments
 (0)