Peter Kurfer
d8d307545f
- Added Benchmarks - Added Nuke build - Refactored directory structure - Generated GitHub Actions config from Nuke - Added tool to handle benchmarking from Nuke
28 lines
No EOL
637 B
C#
28 lines
No EOL
637 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Tand.Core.Api;
|
|
|
|
namespace Tand.Core.Tests
|
|
{
|
|
internal class ResolverMock : IDependencyResolver
|
|
{
|
|
|
|
private readonly IDictionary<Type, object> _targets;
|
|
|
|
|
|
internal ResolverMock(params object[] targets)
|
|
{
|
|
_targets = targets.ToDictionary(target => target.GetType(), target => target);
|
|
}
|
|
|
|
public ITandTarget<T> TargetOfType<T>(Type type)
|
|
{
|
|
ResolvingCounter++;
|
|
return (ITandTarget<T>)_targets[type];
|
|
}
|
|
|
|
internal int ResolvingCounter { get; private set; }
|
|
|
|
}
|
|
} |