Skip to content

use module init instead of CollectionDefinition for verify settings #8830

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.CompilerServices;
using VerifyTests.DiffPlex;

namespace Microsoft.TemplateEngine.Authoring.CLI.IntegrationTests;

public static class ModuleInit
{
[ModuleInitializer]
public static void Init()
{
DerivePathInfo(
(_, _, type, method) => new(
directory: "Snapshots",
typeName: type.Name,
methodName: method.Name));

// Customize diff output of verifier
VerifyDiffPlex.Initialize(OutputType.Compact);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Microsoft.TemplateEngine.Authoring.CLI.IntegrationTests
{
[Collection("Verify Tests")]
public class ValidateCommandTests : TestBase
{
private readonly ITestOutputHelper _log;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Microsoft.TemplateEngine.IDE.IntegrationTests
{
[Collection("Verify Tests")]
public class BasicTests : BootstrapperTestBase, IClassFixture<PackageManager>
{
private readonly PackageManager _packageManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

namespace Microsoft.TemplateEngine.IDE.IntegrationTests
{
[Collection("Verify Tests")]
public class End2EndTests : BootstrapperTestBase
{
[Fact]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.CompilerServices;
using VerifyTests.DiffPlex;

namespace Microsoft.TemplateEngine.IDE.IntegrationTests;

public static class ModuleInit
{
[ModuleInitializer]
public static void Init()
{
DerivePathInfo(
(_, _, type, method) => new(
directory: "Approvals",
typeName: type.Name,
methodName: method.Name));

// Customize diff output of verifier
VerifyDiffPlex.Initialize(OutputType.Compact);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#if !NET5_0_OR_GREATER
namespace System.Runtime.CompilerServices;

[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class ModuleInitializerAttribute : Attribute;
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

namespace Microsoft.TemplateEngine.IDE.IntegrationTests
{
[Collection("Verify Tests")]
public class SnapshotTests : TestBase
{
private readonly ILogger _log;
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.CompilerServices;
using VerifyTests.DiffPlex;

namespace Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests;

public static class ModuleInit
{
[ModuleInitializer]
public static void Init()
{
DerivePathInfo(
(_, _, type, method) => new(
directory: "Approvals",
typeName: type.Name,
methodName: method.Name));

// Customize diff output of verifier
VerifyDiffPlex.Initialize(OutputType.Compact);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

#if !NET5_0_OR_GREATER
namespace System.Runtime.CompilerServices;

[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public sealed class ModuleInitializerAttribute : Attribute;
#endif
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@

namespace Microsoft.TemplateEngine.Orchestrator.RunnableProjects.UnitTests
{
[Collection("Verify Tests")]
public class SnapshotTests : TestBase
{
private readonly ILogger _log;
Expand Down

This file was deleted.

This file was deleted.