-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/github_actions/actions/checkout-4
- Loading branch information
Showing
4 changed files
with
78 additions
and
32 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
src/Maersk.Test.AutoFixtureExtensions/AutoNSubstituteWithMembersCustomization.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,21 @@ | ||
// Copyright (c) Maersk. All rights reserved. | ||
// Licensed under the Apache License. See LICENSE in the project root for license information. | ||
|
||
namespace Maersk.Test.AutoFixtureExtensions; | ||
|
||
using AutoFixture.AutoNSubstitute; | ||
|
||
/// <summary> | ||
/// Inherits from <seealso cref="AutoNSubstituteCustomization"/> and sets 'ConfigureMembers' to true. | ||
/// </summary> | ||
public class AutoNSubstituteWithMembersCustomization : AutoNSubstituteCustomization | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="AutoNSubstituteWithMembersCustomization"/> class. | ||
/// Sets 'ConfigureMembers' to true. | ||
/// </summary> | ||
public AutoNSubstituteWithMembersCustomization() | ||
{ | ||
ConfigureMembers = true; | ||
} | ||
} |
59 changes: 30 additions & 29 deletions
59
src/Maersk.Test.AutoFixtureExtensions/Maersk.Test.AutoFixtureExtensions.csproj
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 |
---|---|---|
@@ -1,32 +1,33 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<VersionPrefix>1.3.1</VersionPrefix> | ||
<Authors>Service Delivery</Authors> | ||
<Company>A.P. Møller - Mærsk</Company> | ||
<PackageProjectUrl>https://github.com/MaerskTech/maersk-test-autofixture-extensions</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/MaerskTech/maersk-test-autofixture-extensions</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
<PackageTags>unittest autofixture</PackageTags> | ||
<Description>AutoFixture extensions for unit testing.</Description> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<EmbedAllSources>true</EmbedAllSources> | ||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> | ||
</PropertyGroup> | ||
<PropertyGroup> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<ImplicitUsings>enable</ImplicitUsings> | ||
<Nullable>enable</Nullable> | ||
<VersionPrefix>1.4.0</VersionPrefix> | ||
<Authors>Service Delivery</Authors> | ||
<Company>A.P. Møller - Mærsk</Company> | ||
<PackageProjectUrl>https://github.com/MaerskTech/maersk-test-autofixture-extensions</PackageProjectUrl> | ||
<RepositoryUrl>https://github.com/MaerskTech/maersk-test-autofixture-extensions</RepositoryUrl> | ||
<RepositoryType>git</RepositoryType> | ||
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression> | ||
<PackageReadmeFile>README.md</PackageReadmeFile> | ||
<PackageTags>unittest autofixture</PackageTags> | ||
<Description>AutoFixture extensions for unit testing.</Description> | ||
<PackageIcon>icon.png</PackageIcon> | ||
<PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
<IncludeSymbols>true</IncludeSymbols> | ||
<SymbolPackageFormat>snupkg</SymbolPackageFormat> | ||
<EmbedUntrackedSources>true</EmbedUntrackedSources> | ||
<EmbedAllSources>true</EmbedAllSources> | ||
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="AutoFixture" Version="4.18.0" /> | ||
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.0" /> | ||
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.0" /> | ||
<PackageReference Include="AutoMapper" Version="12.0.1" /> | ||
<PackageReference Include="Castle.Core" Version="5.1.1" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="AutoFixture" Version="4.18.0" /> | ||
<PackageReference Include="AutoFixture.AutoMoq" Version="4.18.0" /> | ||
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.18.0" /> | ||
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.0" /> | ||
<PackageReference Include="AutoMapper" Version="12.0.1" /> | ||
<PackageReference Include="Castle.Core" Version="5.1.1" /> | ||
</ItemGroup> | ||
</Project> |
24 changes: 24 additions & 0 deletions
24
test/Maersk.Test.AutoFixtureExtensions.Tests/AutoNSubstituteWithMembersCustomizationTest.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,24 @@ | ||
// Copyright (c) Maersk. All rights reserved. | ||
// Licensed under the Apache License. See LICENSE in the project root for license information. | ||
|
||
namespace Maersk.Test.AutoFixtureExtensions.Tests; | ||
|
||
using FluentAssertions; | ||
using Maersk.Test.AutoFixtureExtensions; | ||
using Xunit; | ||
|
||
[Trait(nameof(Category), Category.Unit)] | ||
public sealed class AutoNSubstituteWithMembersCustomizationTest | ||
{ | ||
[Trait(nameof(Category), Category.Unit)] | ||
public sealed class Constructor | ||
{ | ||
[Fact] | ||
public void Given_no_input_When_creating_an_instance_Then_it_sets_ConfigureMembers_true() | ||
{ | ||
var result = new AutoNSubstituteWithMembersCustomization(); | ||
|
||
result.ConfigureMembers.Should().BeTrue(); | ||
} | ||
} | ||
} |
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