Skip to content

Commit 02cf348

Browse files
committed
Fix S2699: add assertions to tests that verify no exception is thrown.
1 parent 66bbc9a commit 02cf348

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

  • bench/Autofac.Extras.DynamicProxy.Benchmarks

bench/Autofac.Extras.DynamicProxy.Benchmarks/Harness.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,15 @@ public class Harness
3333
[Fact]
3434
public void ClassInterception()
3535
{
36-
BenchmarkRunner.Run<ClassInterceptionBenchmark>();
36+
var exception = Record.Exception(() => BenchmarkRunner.Run<ClassInterceptionBenchmark>());
37+
Assert.Null(exception);
3738
}
3839

3940
[Fact]
4041
public void InterfaceInterception()
4142
{
42-
BenchmarkRunner.Run<InterfaceInterceptionBenchmark>();
43+
var exception = Record.Exception(() => BenchmarkRunner.Run<InterfaceInterceptionBenchmark>());
44+
Assert.Null(exception);
4345
}
4446
}
4547
}

0 commit comments

Comments
 (0)