a554a2ab9d
* Use shared IdleManager * Fix usage of _hasSubscribed by using Try methods on concurrent dictionaries * use top exception handler in idle manager subscription * Connectors with TopLevel handler tests * fix handler * start idle call manager tests * add remove tests * merge fixes * add a bit more coverage * Fix tests
21 lines
523 B
C#
21 lines
523 B
C#
using System.Diagnostics.CodeAnalysis;
|
|
using Moq;
|
|
using NUnit.Framework;
|
|
|
|
namespace Speckle.Testing;
|
|
|
|
[ExcludeFromCodeCoverage]
|
|
public abstract class MoqTest
|
|
{
|
|
[SetUp]
|
|
public void Setup() => Repository = new(MockBehavior.Strict);
|
|
|
|
[TearDown]
|
|
public void Verify() => Repository.VerifyAll();
|
|
|
|
protected MockRepository Repository { get; private set; } = new(MockBehavior.Strict);
|
|
|
|
protected Mock<T> Create<T>(MockBehavior behavior = MockBehavior.Strict)
|
|
where T : class => Repository.Create<T>(behavior);
|
|
}
|