11namespace GitBuildInfo . SourceGenerator . Tests
22{
3+ using System ;
34 using GitBuildInfo . SourceGenerator ;
45 using Xunit ;
56
@@ -8,7 +9,7 @@ public class GeneratorTests
89 [ Fact ]
910 public void TestGeneratingNonGeneric ( )
1011 {
11- var result = this . DoTest ( "TestNamespace.Test" , false ) ;
12+ var result = DoTest ( "TestNamespace.Test" , false ) ;
1213 Assert . Equal ( $@ "// <autogenerated/>
1314using Elskom.Generic.Libs;
1415using TestNamespace;
@@ -20,7 +21,7 @@ public void TestGeneratingNonGeneric()
2021 [ Fact ]
2122 public void TestGeneratingGeneric ( )
2223 {
23- var result = this . DoTest ( "TestNamespace.Test" , true ) ;
24+ var result = DoTest ( "TestNamespace.Test" , true ) ;
2425 Assert . Equal ( $@ "// <autogenerated/>
2526using Elskom.Generic.Libs;
2627using TestNamespace;
@@ -31,13 +32,11 @@ public void TestGeneratingGeneric()
3132
3233 [ Fact ]
3334 public void TestGeneratingFailure ( )
34- {
35- Assert . Throws < GenerationFailedException > ( ( ) => this . DoTest ( string . Empty , false ) ) ;
36- }
35+ => Assert . Throws < InvalidOperationException > ( ( ) => DoTest ( string . Empty , false ) ) ;
3736
3837 // the values on GitInfo are not valid in terms of results
3938 // that would normally be from git.
40- private string DoTest ( string assemblyType , bool generic )
39+ private static string DoTest ( string assemblyType , bool generic )
4140 => Generator . CreateAndGenerateCode (
4241 $@ "{{
4342 ""$schema"": ""https://raw.githubusercontent.com/Elskom/GitBuildInfo.SourceGenerator/main/settings.schema.json"",
0 commit comments