Skip to content

Commit 10ed2e5

Browse files
TylerCarrolgithub-actions[bot]
authored andcommitted
🧹 chore: [MegaLinter] Apply [1] automatic fixes
1 parent e9c2415 commit 10ed2e5

4 files changed

Lines changed: 17 additions & 10 deletions

File tree

‎TJC.StateMachine.Tests/Mocks/RevolverMock.cs‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
namespace TJC.StateMachine.Tests.Mocks
22
{
3-
internal class RevolverMock()
4-
: StateMachineBase<RevolverStates>(RevolverStates.Loaded)
3+
internal class RevolverMock() : StateMachineBase<RevolverStates>(RevolverStates.Loaded)
54
{
65
public int BulletsLoaded { get; private set; } = 6;
76

@@ -17,7 +16,9 @@ public bool TryShoot()
1716
State = RevolverStates.Empty;
1817
return true;
1918
default:
20-
throw new InvalidOperationException($"Unknown State [{State}] for method {nameof(TryShoot)}");
19+
throw new InvalidOperationException(
20+
$"Unknown State [{State}] for method {nameof(TryShoot)}"
21+
);
2122
}
2223
}
2324

@@ -27,4 +28,4 @@ public void Reload()
2728
State = RevolverStates.Loaded;
2829
}
2930
}
30-
}
31+
}

‎TJC.StateMachine.Tests/Mocks/RevolverStates.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
internal enum RevolverStates
44
{
55
Loaded,
6-
Empty
6+
Empty,
77
}
8-
}
8+
}

‎TJC.StateMachine.Tests/Tests/StatePropertyAccessibility.cs‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,24 @@ public class StatePropertyAccessibility
99
[TestMethod]
1010
public void EnsurePropertyStateIsNotPubliclyAccessible()
1111
{
12-
var prop = typeof(StateMachineBase<RevolverStates>).GetProperty("State", BindingFlags.Instance | BindingFlags.Public);
12+
var prop = typeof(StateMachineBase<RevolverStates>).GetProperty(
13+
"State",
14+
BindingFlags.Instance | BindingFlags.Public
15+
);
1316
Assert.IsNull(prop);
1417
}
1518

1619
[TestMethod]
1720
public void EnsurePropertyStateIsProtectedAccessible()
1821
{
19-
var prop = typeof(StateMachineBase<RevolverStates>).GetProperty("State", BindingFlags.Instance | BindingFlags.NonPublic);
22+
var prop = typeof(StateMachineBase<RevolverStates>).GetProperty(
23+
"State",
24+
BindingFlags.Instance | BindingFlags.NonPublic
25+
);
2026
Assert.IsNotNull(prop);
2127
var getter = prop.GetMethod;
2228
Assert.IsNotNull(getter);
2329
Assert.IsTrue(getter.IsFamily);
2430
}
2531
}
26-
}
32+
}

‎TJC.StateMachine/StateMachineBase.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ public class StateMachineBase<T>(T initialState)
1212
/// </summary>
1313
protected T State { get; set; } = initialState;
1414
}
15-
}
15+
}

0 commit comments

Comments
 (0)