You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
recyclarr/src/TestLibrary/AutofacTestExtensions.cs

13 lines
269 B

using Autofac;
using NSubstitute;
namespace TestLibrary;
public static class AutofacTestExtensions
{
public static void RegisterMockFor<T>(this ContainerBuilder builder) where T : class
{
builder.RegisterInstance(Substitute.For<T>()).As<T>();
}
}