From 5324b79bc9bd3cf609b5d6f9ead90c93e257cbe9 Mon Sep 17 00:00:00 2001 From: Dzmitry Bazyleu Date: Tue, 12 Nov 2024 15:46:37 +0100 Subject: [PATCH] Rename states for tests --- .../GoBackTests/GoBackVContainerTests.cs | 10 +++++----- .../PlayMode/GoBackTests/GoBackZenjectTests.cs | 10 +++++----- .../{GoBackFlagsData.cs => GoBackTestHelper.cs} | 2 +- ...lagsData.cs.meta => GoBackTestHelper.cs.meta} | 0 .../{StateGoBack1.cs => StateGoBackFirst.cs} | 10 +++++----- ...eGoBack1.cs.meta => StateGoBackFirst.cs.meta} | 0 .../{StateGoBack2.cs => StateGoBackSecond.cs} | 10 +++++----- ...GoBack2.cs.meta => StateGoBackSecond.cs.meta} | 0 .../{StateGoBack3.cs => StateGoBackThird.cs} | 6 +++--- ...eGoBack3.cs.meta => StateGoBackThird.cs.meta} | 0 .../Infrastructure/StateMachineGoBack.cs | 4 ++-- .../GoToStateTests/GoToVContainerTests.cs | 8 ++++---- .../PlayMode/GoToStateTests/GoToZenjectTests.cs | 8 ++++---- .../Infrastructure/CompositeStateGoTo6.cs | 12 ++++++------ .../Infrastructure/CompositeStateGoTo7.cs | 14 +++++++------- .../Infrastructure/StateMachineGoToState.cs | 6 +++--- .../{StateInitRecovery.cs => StateInitial.cs} | 8 ++++---- ...InitRecovery.cs.meta => StateInitial.cs.meta} | 0 .../StateMachineDefaultRecovery.cs | 16 ++++++++-------- .../Infrastructure/StateMachineExitRecovery.cs | 10 +++++----- .../StateMachineGoToStateRecovery.cs | 12 ++++++------ ...Recovery.cs => StateStartedAfterException.cs} | 6 +++--- ...s.meta => StateStartedAfterException.cs.meta} | 0 ...tionRecovery.cs => StateThrowTwoException.cs} | 12 ++++++------ ...ry.cs.meta => StateThrowTwoException.cs.meta} | 0 ...tionRecovery.cs => StateWithFailExecution.cs} | 10 +++++----- ...ry.cs.meta => StateWithFailExecution.cs.meta} | 0 .../RecoveryVContainerTests.cs | 14 +++++++------- .../RecoveryZenjectTests.cs | 14 +++++++------- 29 files changed, 101 insertions(+), 101 deletions(-) rename Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/{GoBackFlagsData.cs => GoBackTestHelper.cs} (81%) rename Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/{GoBackFlagsData.cs.meta => GoBackTestHelper.cs.meta} (100%) rename Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/{StateGoBack1.cs => StateGoBackFirst.cs} (66%) rename Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/{StateGoBack1.cs.meta => StateGoBackFirst.cs.meta} (100%) rename Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/{StateGoBack2.cs => StateGoBackSecond.cs} (66%) rename Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/{StateGoBack2.cs.meta => StateGoBackSecond.cs.meta} (100%) rename Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/{StateGoBack3.cs => StateGoBackThird.cs} (71%) rename Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/{StateGoBack3.cs.meta => StateGoBackThird.cs.meta} (100%) rename Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/{StateInitRecovery.cs => StateInitial.cs} (65%) rename Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/{StateInitRecovery.cs.meta => StateInitial.cs.meta} (100%) rename Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/{StateMagicRecovery.cs => StateStartedAfterException.cs} (71%) rename Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/{StateMagicRecovery.cs.meta => StateStartedAfterException.cs.meta} (100%) rename Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/{StateThrowTwoExceptionRecovery.cs => StateThrowTwoException.cs} (63%) rename Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/{StateThrowTwoExceptionRecovery.cs.meta => StateThrowTwoException.cs.meta} (100%) rename Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/{StateFailExecutionRecovery.cs => StateWithFailExecution.cs} (68%) rename Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/{StateFailExecutionRecovery.cs.meta => StateWithFailExecution.cs.meta} (100%) diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/GoBackVContainerTests.cs b/Assets/UniStateTests/PlayMode/GoBackTests/GoBackVContainerTests.cs index 6115d00..5631fb2 100644 --- a/Assets/UniStateTests/PlayMode/GoBackTests/GoBackVContainerTests.cs +++ b/Assets/UniStateTests/PlayMode/GoBackTests/GoBackVContainerTests.cs @@ -14,19 +14,19 @@ public class GoBackVContainerTests : VContainerTestsBase public IEnumerator RunChaneOfState_GoBackFromTheChain_ExitFromStateMachineWithCorrectOrderOfStates() => UniTask.ToCoroutine(async () => { - await RunAndVerify(); + await RunAndVerify(); }); protected override void SetupBindings(IContainerBuilder builder) { base.SetupBindings(builder); - builder.Register(Lifetime.Singleton); + builder.Register(Lifetime.Singleton); builder.RegisterStateMachine(); - builder.RegisterState(); - builder.RegisterState(); - builder.RegisterState(); + builder.RegisterState(); + builder.RegisterState(); + builder.RegisterState(); } } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/GoBackZenjectTests.cs b/Assets/UniStateTests/PlayMode/GoBackTests/GoBackZenjectTests.cs index 78889a8..29acef3 100644 --- a/Assets/UniStateTests/PlayMode/GoBackTests/GoBackZenjectTests.cs +++ b/Assets/UniStateTests/PlayMode/GoBackTests/GoBackZenjectTests.cs @@ -16,19 +16,19 @@ internal class GoBackZenjectTests : ZenjectTestsBase public IEnumerator RunChaneOfState_GoBackFromTheChain_ExitFromStateMachineWithCorrectOrderOfStates() => UniTask.ToCoroutine(async () => { - await RunAndVerify(); + await RunAndVerify(); }); protected override void SetupBindings(DiContainer container) { base.SetupBindings(container); - container.Bind().ToSelf().AsSingle(); + container.Bind().ToSelf().AsSingle(); container.BindStateMachine(); - container.BindState(); - container.BindState(); - container.BindState(); + container.BindState(); + container.BindState(); + container.BindState(); } } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackFlagsData.cs b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackTestHelper.cs similarity index 81% rename from Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackFlagsData.cs rename to Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackTestHelper.cs index d4d5254..3505c1c 100644 --- a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackFlagsData.cs +++ b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackTestHelper.cs @@ -1,6 +1,6 @@ namespace UniStateTests.PlayMode.GoBackTests.Infrastructure { - internal class GoBackFlagsData + internal class GoBackTestHelper { public bool ExecutedState1 = false; public bool ExecutedState2 = false; diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackFlagsData.cs.meta b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackTestHelper.cs.meta similarity index 100% rename from Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackFlagsData.cs.meta rename to Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/GoBackTestHelper.cs.meta diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack1.cs b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackFirst.cs similarity index 66% rename from Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack1.cs rename to Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackFirst.cs index 8f6781e..42fb3d9 100644 --- a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack1.cs +++ b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackFirst.cs @@ -5,12 +5,12 @@ namespace UniStateTests.PlayMode.GoBackTests.Infrastructure { - internal class StateGoBack1 : StateBase + internal class StateGoBackFirst : StateBase { private readonly ExecutionLogger _logger; - private readonly GoBackFlagsData _goBackFlags; + private readonly GoBackTestHelper _goBackFlags; - public StateGoBack1(ExecutionLogger logger, GoBackFlagsData goBackFlags) + public StateGoBackFirst(ExecutionLogger logger, GoBackTestHelper goBackFlags) { _logger = logger; _goBackFlags = goBackFlags; @@ -18,7 +18,7 @@ public StateGoBack1(ExecutionLogger logger, GoBackFlagsData goBackFlags) public override async UniTask Execute(CancellationToken token) { - _logger.LogStep("StateGoBack1", "Execute"); + _logger.LogStep("StateGoBackFirst", "Execute"); await UniTask.Yield(); @@ -29,7 +29,7 @@ public override async UniTask Execute(CancellationToken tok _goBackFlags.ExecutedState1 = true; - return Transition.GoTo(42); + return Transition.GoTo(42); } } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack1.cs.meta b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackFirst.cs.meta similarity index 100% rename from Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack1.cs.meta rename to Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackFirst.cs.meta diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack2.cs b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackSecond.cs similarity index 66% rename from Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack2.cs rename to Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackSecond.cs index d3ab9f3..c07b083 100644 --- a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack2.cs +++ b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackSecond.cs @@ -5,12 +5,12 @@ namespace UniStateTests.PlayMode.GoBackTests.Infrastructure { - internal class StateGoBack2 : StateBase + internal class StateGoBackSecond : StateBase { private readonly ExecutionLogger _logger; - private readonly GoBackFlagsData _goBackFlags; + private readonly GoBackTestHelper _goBackFlags; - public StateGoBack2(ExecutionLogger logger, GoBackFlagsData goBackFlags) + public StateGoBackSecond(ExecutionLogger logger, GoBackTestHelper goBackFlags) { _logger = logger; _goBackFlags = goBackFlags; @@ -18,7 +18,7 @@ public StateGoBack2(ExecutionLogger logger, GoBackFlagsData goBackFlags) public override async UniTask Execute(CancellationToken token) { - _logger.LogStep("StateGoBack2", $"Execute:{Payload}"); + _logger.LogStep("StateGoBackSecond", $"Execute:{Payload}"); await UniTask.Yield(); @@ -29,7 +29,7 @@ public override async UniTask Execute(CancellationToken tok _goBackFlags.ExecutedState2 = true; - return Transition.GoTo(); + return Transition.GoTo(); } } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack2.cs.meta b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackSecond.cs.meta similarity index 100% rename from Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack2.cs.meta rename to Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackSecond.cs.meta diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack3.cs b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackThird.cs similarity index 71% rename from Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack3.cs rename to Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackThird.cs index f62f35e..1229836 100644 --- a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack3.cs +++ b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackThird.cs @@ -5,17 +5,17 @@ namespace UniStateTests.PlayMode.GoBackTests.Infrastructure { - internal class StateGoBack3 : StateBase + internal class StateGoBackThird : StateBase { private readonly ExecutionLogger _logger; - public StateGoBack3(ExecutionLogger logger, GoBackFlagsData goBackFlags) + public StateGoBackThird(ExecutionLogger logger) { _logger = logger; } public override async UniTask Execute(CancellationToken token) { - _logger.LogStep("StateGoBack3", "Execute"); + _logger.LogStep("StateGoBackThird", "Execute"); await UniTask.Yield(); diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack3.cs.meta b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackThird.cs.meta similarity index 100% rename from Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBack3.cs.meta rename to Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateGoBackThird.cs.meta diff --git a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateMachineGoBack.cs b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateMachineGoBack.cs index c0191b2..cb64aed 100644 --- a/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateMachineGoBack.cs +++ b/Assets/UniStateTests/PlayMode/GoBackTests/Infrastructure/StateMachineGoBack.cs @@ -5,8 +5,8 @@ namespace UniStateTests.PlayMode.GoBackTests.Infrastructure internal class StateMachineGoBack : VerifiableStateMachine { protected override string ExpectedLog => - "StateGoBack1 (Execute) -> StateGoBack2 (Execute:42) -> StateGoBack3 (Execute) -> " + - "StateGoBack2 (Execute:42) -> StateGoBack1 (Execute)"; + "StateGoBackFirst (Execute) -> StateGoBackSecond (Execute:42) -> StateGoBackThird (Execute) -> " + + "StateGoBackSecond (Execute:42) -> StateGoBackFirst (Execute)"; public StateMachineGoBack(ExecutionLogger logger) : base(logger) { diff --git a/Assets/UniStateTests/PlayMode/GoToStateTests/GoToVContainerTests.cs b/Assets/UniStateTests/PlayMode/GoToStateTests/GoToVContainerTests.cs index 109bc45..9d90a06 100644 --- a/Assets/UniStateTests/PlayMode/GoToStateTests/GoToVContainerTests.cs +++ b/Assets/UniStateTests/PlayMode/GoToStateTests/GoToVContainerTests.cs @@ -30,11 +30,11 @@ protected override void SetupBindings(IContainerBuilder builder) builder.RegisterState(); builder.RegisterState(); builder.RegisterState(); - builder.RegisterState(); - builder.RegisterState(); + builder.RegisterState(); + builder.RegisterState(); builder.RegisterState(); - builder.RegisterState(); - builder.RegisterState(); + builder.RegisterState(); + builder.RegisterState(); builder.RegisterState(); } } diff --git a/Assets/UniStateTests/PlayMode/GoToStateTests/GoToZenjectTests.cs b/Assets/UniStateTests/PlayMode/GoToStateTests/GoToZenjectTests.cs index f523b00..877c606 100644 --- a/Assets/UniStateTests/PlayMode/GoToStateTests/GoToZenjectTests.cs +++ b/Assets/UniStateTests/PlayMode/GoToStateTests/GoToZenjectTests.cs @@ -29,11 +29,11 @@ protected override void SetupBindings(DiContainer container) container.BindState(); container.BindState(); container.BindState(); - container.BindState(); - container.BindState(); + container.BindState(); + container.BindState(); container.BindState(); - container.BindState(); - container.BindState(); + container.BindState(); + container.BindState(); container.BindState(); } } diff --git a/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/CompositeStateGoTo6.cs b/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/CompositeStateGoTo6.cs index 9d33e2f..451c488 100644 --- a/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/CompositeStateGoTo6.cs +++ b/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/CompositeStateGoTo6.cs @@ -11,18 +11,18 @@ internal class CompositeStateGoTo6 : DefaultCompositeState } - internal class SubStateGoToX6A : SubStateBase + internal class SubStateGoTo6First : SubStateBase { private readonly ExecutionLogger _logger; - public SubStateGoToX6A(ExecutionLogger logger) + public SubStateGoTo6First(ExecutionLogger logger) { _logger = logger; } public override async UniTask Execute(CancellationToken token) { - _logger.LogStep("SubStateGoToX6A", "Execute"); + _logger.LogStep("SubStateGoTo6First", "Execute"); await UniTask.Yield(token); await UniTask.Yield(token); @@ -31,11 +31,11 @@ public override async UniTask Execute(CancellationToken tok } } - internal class SubStateGoToX6B : SubStateBase + internal class SubStateGoTo6Second : SubStateBase { private readonly ExecutionLogger _logger; - public SubStateGoToX6B(ExecutionLogger logger) + public SubStateGoTo6Second(ExecutionLogger logger) { _logger = logger; } @@ -44,7 +44,7 @@ public override async UniTask Execute(CancellationToken tok { await UniTask.Yield(token); - _logger.LogStep("SubStateGoToX6B", "Execute"); + _logger.LogStep("SubStateGoTo6Second", "Execute"); await UniTask.Yield(token); await UniTask.Yield(token); diff --git a/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/CompositeStateGoTo7.cs b/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/CompositeStateGoTo7.cs index df56211..c9d5804 100644 --- a/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/CompositeStateGoTo7.cs +++ b/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/CompositeStateGoTo7.cs @@ -10,18 +10,18 @@ internal class CompositeStateGoTo7: DefaultCompositeState } - internal class SubStateGoToX7A : SubStateBase + internal class SubStateGoTo7First : SubStateBase { private readonly ExecutionLogger _logger; - public SubStateGoToX7A(ExecutionLogger logger) + public SubStateGoTo7First(ExecutionLogger logger) { _logger = logger; } public override async UniTask Execute(CancellationToken token) { - _logger.LogStep("SubStateGoToX7A", $"Execute:{Payload.DelayFirstSubState}"); + _logger.LogStep("SubStateGoTo7First", $"Execute:{Payload.DelayFirstSubState}"); if (Payload.DelayFirstSubState) { @@ -34,16 +34,16 @@ public override async UniTask Execute(CancellationToken tok await UniTask.Yield(token); await UniTask.Yield(token); - + return Transition.GoTo(true); } } - internal class SubStateGoToX7B : SubStateBase + internal class SubStateGoTo7Second : SubStateBase { private readonly ExecutionLogger _logger; - public SubStateGoToX7B(ExecutionLogger logger) + public SubStateGoTo7Second(ExecutionLogger logger) { _logger = logger; } @@ -52,7 +52,7 @@ public override async UniTask Execute(CancellationToken tok { await UniTask.Yield(token); - _logger.LogStep("SubStateGoToX7B", $"Execute:{Payload.DelayFirstSubState}"); + _logger.LogStep("SubStateGoTo7Second", $"Execute:{Payload.DelayFirstSubState}"); await UniTask.Yield(token); await UniTask.Yield(token); diff --git a/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/StateMachineGoToState.cs b/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/StateMachineGoToState.cs index 08a534e..e9f5e82 100644 --- a/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/StateMachineGoToState.cs +++ b/Assets/UniStateTests/PlayMode/GoToStateTests/Infrastructure/StateMachineGoToState.cs @@ -6,9 +6,9 @@ internal class StateMachineGoToState : VerifiableStateMachine { protected override string ExpectedLog => "StateGoTo1 (Execute) -> StateGoTo2 (Execute) -> StateGoTo3 (Execute) -> " + - "StateGoTo4 (Execute) -> StateGoTo5 (Execute:42) -> SubStateGoToX6A (Execute) -> SubStateGoToX6B (Execute) -> " + - "SubStateGoToX7A (Execute:True) -> SubStateGoToX7B (Execute:True) -> StateGoTo8 (Execute:False) -> " + - "SubStateGoToX7A (Execute:False) -> SubStateGoToX7B (Execute:False) -> StateGoTo8 (Execute:True)"; + "StateGoTo4 (Execute) -> StateGoTo5 (Execute:42) -> SubStateGoTo6First (Execute) -> SubStateGoTo6Second (Execute) -> " + + "SubStateGoTo7First (Execute:True) -> SubStateGoTo7Second (Execute:True) -> StateGoTo8 (Execute:False) -> " + + "SubStateGoTo7First (Execute:False) -> SubStateGoTo7Second (Execute:False) -> StateGoTo8 (Execute:True)"; public StateMachineGoToState(ExecutionLogger logger) : base(logger) { diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitRecovery.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitial.cs similarity index 65% rename from Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitRecovery.cs rename to Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitial.cs index 3addfb8..f45b3c2 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitRecovery.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitial.cs @@ -5,11 +5,11 @@ namespace UniStateTests.PlayMode.RecoveryTransitionTests.Infrastructure { - internal class StateInitRecovery : StateBase + internal class StateInitial : StateBase { private readonly ExecutionLogger _logger; - public StateInitRecovery(ExecutionLogger logger) + public StateInitial(ExecutionLogger logger) { _logger = logger; } @@ -18,9 +18,9 @@ public override async UniTask Execute(CancellationToken tok { await UniTask.Yield(token); - _logger.LogStep("StateInitRecovery", $"Execute"); + _logger.LogStep("StateInitial", $"Execute"); - return Transition.GoTo(); + return Transition.GoTo(); } } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitRecovery.cs.meta b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitial.cs.meta similarity index 100% rename from Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitRecovery.cs.meta rename to Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateInitial.cs.meta diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineDefaultRecovery.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineDefaultRecovery.cs index a11c5d9..5ea696d 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineDefaultRecovery.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineDefaultRecovery.cs @@ -18,13 +18,13 @@ protected override void HandleError(StateMachineErrorData errorData) } protected override string ExpectedLog => - "StateInitRecovery (Execute) -> " + - "StateThrowTwoExceptionRecovery (Initialize) -> StateMachineDefaultRecovery (HandleError (Initialize exception)) -> " + - "StateThrowTwoExceptionRecovery (Execute, Exit) -> StateMachineDefaultRecovery (HandleError (Exit exception)) -> " + - "StateFailExecutionRecovery (Execute) -> StateMachineDefaultRecovery (HandleError (Execution exception)) -> " + - "StateFailExecutionRecovery (Exit, Disposables) -> " + - "StateThrowTwoExceptionRecovery (Initialize) -> StateMachineDefaultRecovery (HandleError (Initialize exception)) -> " + - "StateThrowTwoExceptionRecovery (Execute, Exit) -> StateMachineDefaultRecovery (HandleError (Exit exception)) -> " + - "StateFailExecutionRecovery (Execute, Exit, Disposables)"; + "StateInitial (Execute) -> " + + "StateThrowTwoException (Initialize) -> StateMachineDefaultRecovery (HandleError (Initialize exception)) -> " + + "StateThrowTwoException (Execute, Exit) -> StateMachineDefaultRecovery (HandleError (Exit exception)) -> " + + "StateWithFailExecution (Execute) -> StateMachineDefaultRecovery (HandleError (Execution exception)) -> " + + "StateWithFailExecution (Exit, Disposables) -> " + + "StateThrowTwoException (Initialize) -> StateMachineDefaultRecovery (HandleError (Initialize exception)) -> " + + "StateThrowTwoException (Execute, Exit) -> StateMachineDefaultRecovery (HandleError (Exit exception)) -> " + + "StateWithFailExecution (Execute, Exit, Disposables)"; } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineExitRecovery.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineExitRecovery.cs index c7f4a8f..820f32c 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineExitRecovery.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineExitRecovery.cs @@ -21,10 +21,10 @@ protected override StateTransitionInfo BuildRecoveryTransition(IStateTransitionF => transitionFactory.CreateExitTransition(); protected override string ExpectedLog => - "StateInitRecovery (Execute) -> " + - "StateThrowTwoExceptionRecovery (Initialize) -> StateMachineExitRecovery (HandleError (Initialize exception)) -> " + - "StateThrowTwoExceptionRecovery (Execute, Exit) -> StateMachineExitRecovery (HandleError (Exit exception)) -> " + - "StateFailExecutionRecovery (Execute) -> StateMachineExitRecovery (HandleError (Execution exception)) -> " + - "StateFailExecutionRecovery (Exit, Disposables)"; + "StateInitial (Execute) -> " + + "StateThrowTwoException (Initialize) -> StateMachineExitRecovery (HandleError (Initialize exception)) -> " + + "StateThrowTwoException (Execute, Exit) -> StateMachineExitRecovery (HandleError (Exit exception)) -> " + + "StateWithFailExecution (Execute) -> StateMachineExitRecovery (HandleError (Execution exception)) -> " + + "StateWithFailExecution (Exit, Disposables)"; } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineGoToStateRecovery.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineGoToStateRecovery.cs index 29e123f..9dfef0b 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineGoToStateRecovery.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMachineGoToStateRecovery.cs @@ -18,13 +18,13 @@ protected override void HandleError(StateMachineErrorData errorData) } protected override StateTransitionInfo BuildRecoveryTransition(IStateTransitionFactory transitionFactory) - => transitionFactory.CreateStateTransition(); + => transitionFactory.CreateStateTransition(); protected override string ExpectedLog => - "StateInitRecovery (Execute) -> " + - "StateThrowTwoExceptionRecovery (Initialize) -> StateMachineGoToStateRecovery (HandleError (Initialize exception)) -> " + - "StateThrowTwoExceptionRecovery (Execute, Exit) -> StateMachineGoToStateRecovery (HandleError (Exit exception)) -> " + - "StateFailExecutionRecovery (Execute) -> StateMachineGoToStateRecovery (HandleError (Execution exception)) -> " + - "StateFailExecutionRecovery (Exit, Disposables) -> StateMagicRecovery (Execute)"; + "StateInitial (Execute) -> " + + "StateThrowTwoException (Initialize) -> StateMachineGoToStateRecovery (HandleError (Initialize exception)) -> " + + "StateThrowTwoException (Execute, Exit) -> StateMachineGoToStateRecovery (HandleError (Exit exception)) -> " + + "StateWithFailExecution (Execute) -> StateMachineGoToStateRecovery (HandleError (Execution exception)) -> " + + "StateWithFailExecution (Exit, Disposables) -> StateStartedAfterException (Execute)"; } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMagicRecovery.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateStartedAfterException.cs similarity index 71% rename from Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMagicRecovery.cs rename to Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateStartedAfterException.cs index 77a1833..458d3d6 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMagicRecovery.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateStartedAfterException.cs @@ -5,11 +5,11 @@ namespace UniStateTests.PlayMode.RecoveryTransitionTests.Infrastructure { - internal class StateMagicRecovery : StateBase + internal class StateStartedAfterException : StateBase { private readonly ExecutionLogger _logger; - public StateMagicRecovery(ExecutionLogger logger) + public StateStartedAfterException(ExecutionLogger logger) { _logger = logger; } @@ -18,7 +18,7 @@ public override async UniTask Execute(CancellationToken tok { await UniTask.Yield(token); - _logger.LogStep("StateMagicRecovery", $"Execute"); + _logger.LogStep("StateStartedAfterException", $"Execute"); return Transition.GoToExit(); } diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMagicRecovery.cs.meta b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateStartedAfterException.cs.meta similarity index 100% rename from Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateMagicRecovery.cs.meta rename to Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateStartedAfterException.cs.meta diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoExceptionRecovery.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoException.cs similarity index 63% rename from Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoExceptionRecovery.cs rename to Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoException.cs index 368e983..ab25a77 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoExceptionRecovery.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoException.cs @@ -6,18 +6,18 @@ namespace UniStateTests.PlayMode.RecoveryTransitionTests.Infrastructure { - internal class StateThrowTwoExceptionRecovery : StateBase + internal class StateThrowTwoException : StateBase { private readonly ExecutionLogger _logger; - public StateThrowTwoExceptionRecovery(ExecutionLogger logger) + public StateThrowTwoException(ExecutionLogger logger) { _logger = logger; } public override UniTask Initialize(CancellationToken token) { - _logger.LogStep("StateThrowTwoExceptionRecovery", $"Initialize"); + _logger.LogStep("StateThrowTwoException", $"Initialize"); throw new Exception("Initialize exception"); } @@ -26,14 +26,14 @@ public override async UniTask Execute(CancellationToken tok { await UniTask.Yield(token); - _logger.LogStep("StateThrowTwoExceptionRecovery", $"Execute"); + _logger.LogStep("StateThrowTwoException", $"Execute"); - return Transition.GoTo(); + return Transition.GoTo(); } public override UniTask Exit(CancellationToken token) { - _logger.LogStep("StateThrowTwoExceptionRecovery", $"Exit"); + _logger.LogStep("StateThrowTwoException", $"Exit"); throw new Exception("Exit exception"); } diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoExceptionRecovery.cs.meta b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoException.cs.meta similarity index 100% rename from Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoExceptionRecovery.cs.meta rename to Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateThrowTwoException.cs.meta diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateFailExecutionRecovery.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateWithFailExecution.cs similarity index 68% rename from Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateFailExecutionRecovery.cs rename to Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateWithFailExecution.cs index 4c5a3cf..df3bc8e 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateFailExecutionRecovery.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateWithFailExecution.cs @@ -6,12 +6,12 @@ namespace UniStateTests.PlayMode.RecoveryTransitionTests.Infrastructure { - internal class StateFailExecutionRecovery : StateBase + internal class StateWithFailExecution : StateBase { private readonly ExecutionLogger _logger; private readonly RecoveryTestHelper _testHelper; - public StateFailExecutionRecovery(RecoveryTestHelper testHelper, ExecutionLogger logger) + public StateWithFailExecution(RecoveryTestHelper testHelper, ExecutionLogger logger) { _testHelper = testHelper; _logger = logger; @@ -19,9 +19,9 @@ public StateFailExecutionRecovery(RecoveryTestHelper testHelper, ExecutionLogger public override UniTask Execute(CancellationToken token) { - Disposables.Add(() => { _logger.LogStep("StateFailExecutionRecovery", $"Disposables"); }); + Disposables.Add(() => { _logger.LogStep("StateWithFailExecution", $"Disposables"); }); - _logger.LogStep("StateFailExecutionRecovery", $"Execute"); + _logger.LogStep("StateWithFailExecution", $"Execute"); if (_testHelper.ExceptionWasThrown) { @@ -35,7 +35,7 @@ public override UniTask Execute(CancellationToken token) public override UniTask Exit(CancellationToken token) { - _logger.LogStep("StateFailExecutionRecovery", $"Exit"); + _logger.LogStep("StateWithFailExecution", $"Exit"); return UniTask.CompletedTask; } diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateFailExecutionRecovery.cs.meta b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateWithFailExecution.cs.meta similarity index 100% rename from Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateFailExecutionRecovery.cs.meta rename to Assets/UniStateTests/PlayMode/RecoveryTransitionTests/Infrastructure/StateWithFailExecution.cs.meta diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/RecoveryVContainerTests.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/RecoveryVContainerTests.cs index 2b2d00b..b5b416c 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/RecoveryVContainerTests.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/RecoveryVContainerTests.cs @@ -14,15 +14,15 @@ public class RecoveryVContainerTests : VContainerTestsBase { [UnityTest] public IEnumerator RunChaneOfStateWithDefaultRecovery_ExceptionDuringExecute_StateMachineExecuteGoBack() => - UniTask.ToCoroutine(async () => { await RunAndVerify(); }); + UniTask.ToCoroutine(async () => { await RunAndVerify(); }); [UnityTest] public IEnumerator RunChaneOfStateWithGoToStateRecovery_ExceptionDuringExecute_StateMachineGoToRecoveryState() => - UniTask.ToCoroutine(async () => { await RunAndVerify(); }); + UniTask.ToCoroutine(async () => { await RunAndVerify(); }); [UnityTest] public IEnumerator RunChaneOfStateWithExitRecovery_ExceptionDuringExecute_StateMachineExit() => - UniTask.ToCoroutine(async () => { await RunAndVerify(); }); + UniTask.ToCoroutine(async () => { await RunAndVerify(); }); protected override void SetupBindings(IContainerBuilder builder) { @@ -34,10 +34,10 @@ protected override void SetupBindings(IContainerBuilder builder) builder.RegisterStateMachine(); builder.RegisterStateMachine(); - builder.RegisterState(); - builder.RegisterState(); - builder.RegisterState(); - builder.RegisterState(); + builder.RegisterState(); + builder.RegisterState(); + builder.RegisterState(); + builder.RegisterState(); } } } \ No newline at end of file diff --git a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/RecoveryZenjectTests.cs b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/RecoveryZenjectTests.cs index 4a5aef0..aeaca17 100644 --- a/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/RecoveryZenjectTests.cs +++ b/Assets/UniStateTests/PlayMode/RecoveryTransitionTests/RecoveryZenjectTests.cs @@ -15,15 +15,15 @@ public class RecoveryZenjectTests : ZenjectTestsBase { [UnityTest] public IEnumerator RunChaneOfStateWithDefaultRecovery_ExceptionDuringExecute_StateMachineExecuteGoBack() => - UniTask.ToCoroutine(async () => { await RunAndVerify(); }); + UniTask.ToCoroutine(async () => { await RunAndVerify(); }); [UnityTest] public IEnumerator RunChaneOfStateWithGoToStateRecovery_ExceptionDuringExecute_StateMachineGoToRecoveryState() => - UniTask.ToCoroutine(async () => { await RunAndVerify(); }); + UniTask.ToCoroutine(async () => { await RunAndVerify(); }); [UnityTest] public IEnumerator RunChaneOfStateWithExitRecovery_ExceptionDuringExecute_StateMachineExit() => - UniTask.ToCoroutine(async () => { await RunAndVerify(); }); + UniTask.ToCoroutine(async () => { await RunAndVerify(); }); protected override void SetupBindings(DiContainer container) { @@ -35,10 +35,10 @@ protected override void SetupBindings(DiContainer container) container.BindStateMachine(); container.BindStateMachine(); - container.BindState(); - container.BindState(); - container.BindState(); - container.BindState(); + container.BindState(); + container.BindState(); + container.BindState(); + container.BindState(); } } } \ No newline at end of file