Skip to content

Commit

Permalink
Added snapshot test
Browse files Browse the repository at this point in the history
  • Loading branch information
SteveDunn committed Nov 19, 2024
1 parent 8953dcd commit 16eca85
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,32 @@ public partial struct Name;
.IgnoreInitialCompilationErrors()
.RunOn(TargetFramework.Net8_0);
}

[Fact]
public async Task Generates_from_a_marker()
{
var source = """
using System;
using Vogen;
[assembly: VogenDefaults(conversions: Conversions.None)]
namespace N;
[ValueObject<string>]
public partial struct Name;
[ValueObject<int>]
public partial struct Age;
[BsonSerializer<Name>]
[BsonSerializer<Age>]
public partial class MyMarkers;
""";

await new SnapshotRunner<ValueObjectGenerator>()
.WithSource(source)
.IgnoreInitialCompilationErrors()
.RunOn(TargetFramework.Net8_0);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@


0 comments on commit 16eca85

Please sign in to comment.