Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/actions/checkout-4
Browse files Browse the repository at this point in the history
  • Loading branch information
ruma-paul-maersk authored Oct 16, 2024
2 parents a23495a + 7f025e2 commit 1b2b7b4
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 32 deletions.
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;
}
}
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>
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();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
<PackageReference Include="AutoFixture.Idioms" Version="4.18.0" />
<PackageReference Include="AutoFixture.Xunit2" Version="4.18.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="xunit" Version="2.6.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.3">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down

0 comments on commit 1b2b7b4

Please sign in to comment.