-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #718 from SteveDunn/stj-namespace-bug-717
Fix: System.Text.Json factories fail to generate if assembly name has hyphens
- Loading branch information
Showing
15 changed files
with
1,595 additions
and
59 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
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
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
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
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
This file was deleted.
Oops, something went wrong.
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
30 changes: 30 additions & 0 deletions
30
tests/SnapshotTests/BugFixes/Bug717_Stj_does_not_escape_dashed_namespace.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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
using System.Threading.Tasks; | ||
using Vogen; | ||
|
||
namespace SnapshotTests.BugFixes; | ||
|
||
// See https://github.com/SteveDunn/Vogen/issues/717 | ||
public class Bug717_Stj_does_not_escape_dashed_namespace | ||
{ | ||
[Fact] | ||
public async Task Test() | ||
{ | ||
var source = """ | ||
using System; | ||
using Vogen; | ||
using System.Text.Json; | ||
namespace My_Namespace; | ||
[ValueObject(typeof(Guid))] | ||
public partial struct Vo; | ||
"""; | ||
|
||
await new SnapshotRunner<ValueObjectGenerator>() | ||
.WithAssemblyName("MY-PROJECT") | ||
.WithSource(source) | ||
.IgnoreInitialCompilationErrors() | ||
.RunOnAllFrameworks(); | ||
} | ||
} |
Oops, something went wrong.