15 lines
335 B
C#
15 lines
335 B
C#
using Microsoft.Extensions.Options;
|
|
using NSubstitute;
|
|
|
|
namespace Flypaper.Tests;
|
|
|
|
internal static class TestOptions
|
|
{
|
|
public static IOptionsMonitor<T> Monitor<T>(T value) where T : class
|
|
{
|
|
var monitor = Substitute.For<IOptionsMonitor<T>>();
|
|
monitor.CurrentValue.Returns(value);
|
|
return monitor;
|
|
}
|
|
}
|