Files
Umbraco-CMS/tests/Umbraco.Tests.UnitTests/AutoFixture/AutoMoqDataAttribute.cs
Bjarke Berg 0f1c2f7022 Ensure no management api for v12 (#14197)
* Remove management api

* Remove actual files
2023-05-04 13:32:41 +02:00

21 lines
761 B
C#

// Copyright (c) Umbraco.
// See LICENSE for more details.
using AutoFixture.NUnit3;
namespace Umbraco.Cms.Tests.UnitTests.AutoFixture;
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor)]
public class AutoMoqDataAttribute : AutoDataAttribute
{
/// <summary>
/// Uses AutoFixture to automatically mock (using Moq) the injected types. E.g when injecting interfaces.
/// AutoFixture is used to generate concrete types. If the concrete type required some types injected, the
/// [Frozen] can be used to ensure the same variable is injected and available as parameter for the test
/// </summary>
public AutoMoqDataAttribute()
: base(UmbracoAutoMoqFixtureFactory.CreateDefaultFixture)
{
}
}