Moved new test classes

This commit is contained in:
Paul Johnson
2021-10-18 08:29:43 +01:00
parent f214d58f0b
commit b71d6afba6
2 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
using System;
using Microsoft.Extensions.Options;
namespace Umbraco.Cms.Tests.Common
{
public class TestOptionsMonitor<T> : IOptionsMonitor<T> where T : class
{
public TestOptionsMonitor(T currentValue) => CurrentValue = currentValue;
public T Get(string name) => CurrentValue;
public IDisposable OnChange(Action<T, string> listener) => null;
public T CurrentValue { get; }
}
}

View File

@@ -0,0 +1,11 @@
using Microsoft.Extensions.Options;
namespace Umbraco.Cms.Tests.Common
{
public class TestOptionsSnapshot<T> : IOptionsSnapshot<T> where T : class
{
public TestOptionsSnapshot(T value) => Value = value;
public T Value { get; }
public T Get(string name) => Value;
}
}