Skip to content

Commit a04ec86

Browse files
authored
Simplify source gen (#1443)
1 parent 4722c62 commit a04ec86

19 files changed

Lines changed: 195 additions & 280 deletions

src/Verify.MSTest.SourceGenerator.Tests/GlobalNamespaceTests.HasAssemblyAttribute.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Foo
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/GlobalNamespaceTests.HasAssemblyAttributeAndCustomTestClassAttribute.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Foo
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/GlobalNamespaceTests.HasAttributeOnClass.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Foo
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/GlobalNamespaceTests.HasBothAssemblyAndClassAttributes.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Foo
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/InheritanceTests.HasAssemblyAttributeAndTestClassInheritance.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Base
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/InheritanceTests.HasAssemblyAttributeWithTestClassOnDerivedAndMarkerAttributeOnBase.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Base
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/InheritanceTests.HasAttributeOnBaseAndDerivedClasses.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Base
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/InheritanceTests.HasAttributeOnBaseClass.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Base
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/InheritanceTests.HasAttributeOnDerivedClass.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Derived
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

src/Verify.MSTest.SourceGenerator.Tests/InheritanceTests.HasAttributeOnDerivedClassAndAbstractPropertyManuallyDefinedInBase.verified.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@
1111

1212
partial class Derived
1313
{
14-
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15-
public sealed override global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16-
{
17-
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18-
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19-
}
14+
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Verify.MSTest.SourceGenerator", "1.0.0.0")]
15+
public sealed override global::Microsoft.VisualStudio.TestTools.UnitTesting.TestContext TestContext
16+
{
17+
get => global::VerifyMSTest.Verifier.CurrentTestContext.Value!.TestContext;
18+
set => global::VerifyMSTest.Verifier.CurrentTestContext.Value = new global::VerifyMSTest.TestExecutionContext(value, GetType());
19+
}
2020
}
2121

2222
}

0 commit comments

Comments
 (0)