Skip to content

Commit 46e3cbe

Browse files
authored
Merge pull request #176 from JSkimming/use-method-groups
Use method groups
2 parents 26c1915 + b73607f commit 46e3cbe

3 files changed

Lines changed: 32 additions & 14 deletions

File tree

.dockerignore

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
**/obj
1+
**/.classpath
2+
**/.dockerignore
3+
**/.env
4+
**/.git
5+
**/.github
6+
**/.gitignore
7+
**/.circleci
8+
**/.project
9+
**/.settings
10+
**/.toolstarget
11+
**/.vs
12+
**/.vscode
13+
**/*.*proj.user
14+
**/*.dbmdl
15+
**/*.jfm
16+
**/azds.yaml
217
**/bin
3-
.vs
4-
.git
5-
.gitignore
6-
.circleci
7-
Dockerfile
18+
**/charts
19+
**/docker-compose*
20+
**/Dockerfile*
21+
**/obj
22+
**/*.md
23+
LICENSE
824
**/TestResults

castle.core.asyncinterceptor.sln.DotSettings

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,6 @@
99
<s:String x:Key="/Default/CodeStyle/CSharpUsing/MandatoryImports/=System_002ELinq/@EntryIndexedValue">System.Linq</s:String>
1010
<s:Boolean x:Key="/Default/CodeStyle/CSharpUsing/QualifiedUsingAtNestedScope/@EntryValue">True</s:Boolean>
1111
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FBLOCK_005FSCOPE_005FFUNCTION/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
12-
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FCLASS/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String></wpf:ResourceDictionary>
12+
<s:String x:Key="/Default/CodeStyle/Naming/JavaScriptNaming/UserRules/=JS_005FCLASS/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
13+
<s:Boolean x:Key="/Default/Environment/Filtering/ExcludeCoverageFilters/=_002A_002ETests_003B_002A_003B_002A_003B_002A/@EntryIndexedValue">True</s:Boolean>
14+
<s:Boolean x:Key="/Default/Environment/Filtering/ExcludeCoverageFilters/=_002A_003B_002A_003B_002A_002ENoCoverage_002E_002A_003B_002A/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>

test/Castle.Core.AsyncInterceptor.Tests/AsyncExceptionInterceptorShould.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void ShouldLog3Entries()
5858
{
5959
// Act
6060
InvalidOperationException ex =
61-
Assert.Throws<InvalidOperationException>(() => _proxy.SynchronousVoidExceptionMethod());
61+
Assert.Throws<InvalidOperationException>(_proxy.SynchronousVoidExceptionMethod);
6262

6363
// Assert
6464
Assert.Equal(3, _log.Count);
@@ -71,7 +71,7 @@ public void ShouldLog3Entries()
7171
public void ShouldAllowProcessingPriorToInvocation()
7272
{
7373
// Act
74-
Assert.Throws<InvalidOperationException>(() => _proxy.SynchronousVoidExceptionMethod());
74+
Assert.Throws<InvalidOperationException>(_proxy.SynchronousVoidExceptionMethod);
7575

7676
// Assert
7777
Assert.Equal(MethodName + ":StartingVoidInvocation", _log[0]);
@@ -82,7 +82,7 @@ public void ShouldAllowExceptionHandling()
8282
{
8383
// Act
8484
InvalidOperationException ex =
85-
Assert.Throws<InvalidOperationException>(() => _proxy.SynchronousVoidExceptionMethod());
85+
Assert.Throws<InvalidOperationException>(_proxy.SynchronousVoidExceptionMethod);
8686

8787
// Assert
8888
Assert.Equal(MethodName + ":VoidExceptionThrown:" + ex.Message, _log[2]);
@@ -96,13 +96,13 @@ public void ShouldPreserveTheStackTrace()
9696

9797
// Act
9898
InvalidOperationException interceptedException =
99-
Assert.Throws<InvalidOperationException>(() => _proxy.SynchronousVoidExceptionMethod());
99+
Assert.Throws<InvalidOperationException>(_proxy.SynchronousVoidExceptionMethod);
100100

101101
// Assert
102102

103103
// Get the exception without being intercepted, this is used to compare against the intercepted exception.
104104
InvalidOperationException noneInterceptedException =
105-
Assert.Throws<InvalidOperationException>(() => _target.SynchronousVoidExceptionMethod());
105+
Assert.Throws<InvalidOperationException>(_target.SynchronousVoidExceptionMethod);
106106

107107
CompareStackTrace(noneInterceptedException, interceptedException);
108108
}
@@ -509,7 +509,7 @@ public async Task ShouldReturnAFaultedTask()
509509
Assert.IsType<ArgumentOutOfRangeException>(result.Exception?.InnerException);
510510

511511
ArgumentOutOfRangeException noneInterceptedException =
512-
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() => target.Test1()).ConfigureAwait(false);
512+
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(target.Test1).ConfigureAwait(false);
513513

514514
CompareStackTrace(noneInterceptedException, result.Exception?.InnerException);
515515
}
@@ -529,7 +529,7 @@ public async Task ShouldReturnAFaultedTaskResult()
529529
Assert.IsType<ArgumentOutOfRangeException>(result.Exception?.InnerException);
530530

531531
ArgumentOutOfRangeException noneInterceptedException =
532-
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(() => target.Test2()).ConfigureAwait(false);
532+
await Assert.ThrowsAsync<ArgumentOutOfRangeException>(target.Test2).ConfigureAwait(false);
533533

534534
CompareStackTrace(noneInterceptedException, result.Exception?.InnerException);
535535
}

0 commit comments

Comments
 (0)