Skip to content

Commit

Permalink
Add config to enforce TAP naming. Related to rabbitmq#1296
Browse files Browse the repository at this point in the history
  • Loading branch information
lukebakken committed Apr 12, 2023
1 parent 2f55690 commit 86ac876
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 24 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,18 @@ csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_throw_expression = true:suggestion
csharp_style_conditional_delegate_call = true:suggestion

# Async methods should have "Async" suffix
dotnet_naming_rule.async_methods_end_in_async.symbols = any_async_methods
dotnet_naming_rule.async_methods_end_in_async.style = end_in_async
dotnet_naming_rule.async_methods_end_in_async.severity = warning

dotnet_naming_symbols.any_async_methods.applicable_kinds = method
dotnet_naming_symbols.any_async_methods.applicable_accessibilities = *
dotnet_naming_symbols.any_async_methods.required_modifiers = async

dotnet_naming_style.end_in_async.required_suffix = Async
dotnet_naming_style.end_in_async.capitalization = pascal_case_style

# Other features
csharp_style_prefer_index_operator = false:none
csharp_style_prefer_range_operator = false:none
Expand Down
24 changes: 0 additions & 24 deletions projects/Unit/TestBlockingCell.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,30 +111,6 @@ public void TestGetValueWhichDoesTimeOutWithTimeSpan()
Assert.Throws<TimeoutException>(() => k.WaitForValue(TimingInterval));
}

[Fact]
public void TestGetValueWithTimeoutInfinite()
{
var k = new BlockingCell<int>();
SetAfter(TimingInterval, k, 123);

ResetTimer();
int v = k.WaitForValue(Timeout.InfiniteTimeSpan);
Assert.True(TimingInterval - SafetyMargin < ElapsedMs());
Assert.Equal(123, v);
}

[Fact]
public void TestBackgroundUpdateSucceeds()
{
var k = new BlockingCell<int>();
SetAfter(TimingInterval, k, 123);

ResetTimer();
int v = k.WaitForValue(TimingInterval_2X);
Assert.True(TimingInterval - SafetyMargin < ElapsedMs());
Assert.Equal(123, v);
}

[Fact]
public void TestBackgroundUpdateSucceedsWithTimeSpan()
{
Expand Down

0 comments on commit 86ac876

Please sign in to comment.