tand/test/Tand.Core.Tests/TandTests.cs
Peter Kurfer d8d307545f
Refactored
- Added Benchmarks
- Added Nuke build
- Refactored directory structure
- Generated GitHub Actions config from Nuke
- Added tool to handle benchmarking from Nuke
2020-03-21 01:10:20 +01:00

22 lines
No EOL
641 B
C#

using Xunit;
namespace Tand.Core.Tests
{
public class TandTests
{
[Fact]
public void GenerateTand()
{
var handleCallCounter = 0;
var resolver = new ResolverMock(new LogTarget<ITandSample>(tandSample => handleCallCounter++));
var tand = new Tand(resolver);
var sample = tand.DecorateWithTand<ITandSample, TandSample>(new TandSample());
var result = sample.LogMyParams("Hello, World", 42);
Assert.Equal(1, result);
Assert.Equal(2, handleCallCounter);
Assert.Equal(1, resolver.ResolvingCounter);
}
}
}