Skip to content

Commit 34766e7

Browse files
committed
Added ExternalPlugins.NUnitRetry
1 parent 6a3df77 commit 34766e7

File tree

7 files changed

+160
-0
lines changed

7 files changed

+160
-0
lines changed

.editorconfig

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
2+
[*.proto]
3+
indent_style=tab
4+
indent_size=tab
5+
tab_width=4
6+
7+
[*.{asax,ascx,aspx,cs,cshtml,css,htm,html,js,json,jsx,master,razor,resjson,skin,ts,tsx,vb,xaml,xamlx,xoml}]
8+
indent_style=space
9+
indent_size=4
10+
tab_width=4
11+
12+
[*.{appxmanifest,build,config,csproj,dbml,discomap,dtd,jsproj,lsproj,njsproj,nuspec,proj,props,resw,resx,StyleCop,targets,tasks,vbproj,xml,xsd,json}]
13+
indent_style=space
14+
indent_size=2
15+
tab_width=2
16+
17+
[*]
18+
19+
# Microsoft .NET properties
20+
csharp_new_line_before_members_in_object_initializers=false
21+
csharp_preferred_modifier_order=public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
22+
csharp_space_after_cast=false
23+
csharp_style_var_elsewhere=true:hint
24+
csharp_style_var_for_built_in_types=true:hint
25+
csharp_style_var_when_type_is_apparent=true:hint
26+
dotnet_style_predefined_type_for_locals_parameters_members=true:hint
27+
dotnet_style_predefined_type_for_member_access=true:hint
28+
dotnet_style_qualification_for_event=false:warning
29+
dotnet_style_qualification_for_field=false:warning
30+
dotnet_style_qualification_for_method=false:warning
31+
dotnet_style_qualification_for_property=false:warning
32+
dotnet_style_require_accessibility_modifiers=for_non_interface_members:hint
33+
34+
# ReSharper properties
35+
resharper_align_linq_query=true
36+
resharper_align_multiline_argument=true
37+
resharper_align_multiline_calls_chain=true
38+
resharper_align_multiline_extends_list=true
39+
resharper_align_multiline_for_stmt=true
40+
resharper_align_multline_type_parameter_constrains=true
41+
resharper_align_multline_type_parameter_list=true
42+
resharper_blank_lines_around_single_line_auto_property=1
43+
resharper_blank_lines_around_single_line_property=1
44+
resharper_blank_lines_before_single_line_comment=1
45+
resharper_braces_for_for=required
46+
resharper_braces_for_foreach=required
47+
resharper_braces_for_ifelse=required
48+
resharper_braces_for_while=required
49+
resharper_csharp_align_multiple_declaration=true
50+
resharper_csharp_blank_lines_around_single_line_invocable=1
51+
resharper_csharp_insert_final_newline=true
52+
resharper_csharp_max_line_length=200
53+
resharper_csharp_wrap_arguments_style=chop_if_long
54+
resharper_csharp_wrap_before_binary_opsign=true
55+
resharper_csharp_wrap_chained_binary_expressions=chop_if_long
56+
resharper_csharp_wrap_extends_list_style=chop_if_long
57+
resharper_csharp_wrap_parameters_style=chop_if_long
58+
resharper_for_built_in_types=use_var_when_evident
59+
resharper_indent_nested_fixed_stmt=true
60+
resharper_indent_nested_foreach_stmt=true
61+
resharper_indent_nested_for_stmt=true
62+
resharper_indent_nested_lock_stmt=true
63+
resharper_indent_nested_usings_stmt=true
64+
resharper_indent_nested_while_stmt=true
65+
resharper_indent_switch_labels=true
66+
resharper_instance_members_qualify_declared_in=base_class
67+
resharper_js_brace_style=next_line
68+
resharper_js_wrap_before_binary_opsign=true
69+
resharper_keep_blank_lines_between_declarations=1
70+
resharper_keep_blank_lines_in_code=1
71+
resharper_keep_blank_lines_in_declarations=1
72+
resharper_keep_existing_embedded_arrangement=false
73+
resharper_local_function_body=expression_body
74+
resharper_method_or_operator_body=expression_body
75+
resharper_new_line_before_catch=true
76+
resharper_new_line_before_else=true
77+
resharper_new_line_before_finally=true
78+
resharper_new_line_before_while=true
79+
resharper_place_accessorholder_attribute_on_same_line=False
80+
resharper_place_field_attribute_on_same_line=if_owner_is_single_line
81+
resharper_place_simple_case_statement_on_same_line=if_owner_is_single_line
82+
resharper_space_within_single_line_array_initializer_braces=true
83+
resharper_wrap_after_declaration_lpar=true
84+
resharper_wrap_after_invocation_lpar=true
85+
resharper_wrap_before_arrow_with_expressions=true
86+
resharper_wrap_before_extends_colon=true
87+
resharper_wrap_chained_binary_expressions=chop_if_long
88+
resharper_wrap_chained_method_calls=chop_if_long
89+
resharper_wrap_linq_expressions=chop_always
90+
resharper_wrap_multiple_type_parameter_constraints_style=chop_always
91+
92+
# ReSharper inspection severities
93+
resharper_convert_to_static_class_highlighting=none
94+
resharper_function_complexity_overflow_highlighting=warning
95+
resharper_member_can_be_made_static_global_highlighting=none
96+
resharper_member_can_be_made_static_local_highlighting=none
97+
resharper_redundant_base_qualifier_highlighting=warning
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<TargetFramework>net8.0</TargetFramework>
5+
<Nullable>enable</Nullable>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
</PropertyGroup>
8+
9+
<ItemGroup>
10+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
11+
<PackageReference Include="NUnitRetry.ReqnrollPlugin" Version="1.0.100" />
12+
<PackageReference Include="Reqnroll.NUnit" Version="2.2.2-local" />
13+
<PackageReference Include="nunit" Version="3.14.0" />
14+
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
15+
</ItemGroup>
16+
17+
</Project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@Retry
2+
Feature: Retryable Feature
3+
4+
Scenario: Retry scenario three times by default
5+
When I increment the retry count
6+
Then the result should be 3
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
global using NUnit;
2+
global using Reqnroll;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
using NUnit.Framework;
2+
3+
namespace ExternalPlugins.NUnitRetry.StepDefinitions
4+
{
5+
[Binding]
6+
public sealed class CalculatorStepDefinitions
7+
{
8+
public static int RetryCount = 0;
9+
10+
[When("I increment the retry count")]
11+
public void WhenIIncrementTheRetryCount()
12+
{
13+
RetryCount++;
14+
if (RetryCount < 3)
15+
Assert.Fail("Simulate a failure");
16+
}
17+
18+
[Then("the result should be {int}")]
19+
public void ThenTheResultShouldBe(int result)
20+
{
21+
Assert.AreEqual(result, RetryCount);
22+
}
23+
}
24+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"$schema": "https://schemas.reqnroll.net/reqnroll-config-latest.json",
3+
4+
"NRetrySettings": {
5+
"maxRetries": 3,
6+
"applyGlobally": true
7+
}
8+
}

ReqnrollPlugins/ReqnrollPlugins.sln

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReqnrollPlugins.Verify", "R
1515
EndProject
1616
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReqnrollPlugins.xRetry", "ReqnrollPlugins.xRetry\ReqnrollPlugins.xRetry.csproj", "{DC7F1E57-11B7-431C-9604-CDB71CE11370}"
1717
EndProject
18+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ExternalPlugins.NUnitRetry", "ExternalPlugins.NUnitRetry\ExternalPlugins.NUnitRetry.csproj", "{E367B3D5-A3FD-420B-A18D-52094E125135}"
19+
EndProject
1820
Global
1921
GlobalSection(SolutionConfigurationPlatforms) = preSolution
2022
Debug|Any CPU = Debug|Any CPU
@@ -45,6 +47,10 @@ Global
4547
{DC7F1E57-11B7-431C-9604-CDB71CE11370}.Debug|Any CPU.Build.0 = Debug|Any CPU
4648
{DC7F1E57-11B7-431C-9604-CDB71CE11370}.Release|Any CPU.ActiveCfg = Release|Any CPU
4749
{DC7F1E57-11B7-431C-9604-CDB71CE11370}.Release|Any CPU.Build.0 = Release|Any CPU
50+
{E367B3D5-A3FD-420B-A18D-52094E125135}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
51+
{E367B3D5-A3FD-420B-A18D-52094E125135}.Debug|Any CPU.Build.0 = Debug|Any CPU
52+
{E367B3D5-A3FD-420B-A18D-52094E125135}.Release|Any CPU.ActiveCfg = Release|Any CPU
53+
{E367B3D5-A3FD-420B-A18D-52094E125135}.Release|Any CPU.Build.0 = Release|Any CPU
4854
EndGlobalSection
4955
GlobalSection(SolutionProperties) = preSolution
5056
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)