StateBliss (nuget): Finite state machine with fluent syntax. i.e.  public class DefineAuthenticationState2 : StateDefinition<AuthenticationState> { 	public override void Define(IStateFromBuilder<AuthenticationState> builder) 	{ 		builder.From(AuthenticationState.Unauthenticated).To(AuthenticationState.Authenticated) 			.Changing(this, a => a.ChangingHandler1);  	}  	private void ChangingHandler2(StateChangeGuardInfo<AuthenticationState> changeinfo) 	{ 		var data = changeinfo.DataAs<Dictionary<string, object>>(); 		data["key2"] = "ChangingHandler2"; 	} }  public class BasicTests //xUnit { 		 	public enum AuthenticationState 	{ 		Unauthenticated, 		Authenticated 	}  	[Fact] 	public void Tests() 	{ 		// Arrange 		StateMachineManager.Register(new [] { typeof(BasicTests).Assembly }); //Register at bootstrap of your application, i.e. Startup 		var currentState = AuthenticationState.Unauthenticated; 		var data = new Dictionary<string, object>(); 		 		// Act 		var changeInfo = StateMachineManager.Trigger(currentState, AuthenticationState.Authenticated, data); 		 		// Assert 		Assert.True(changeInfo.StateChangedSucceeded); 		Assert.Equal("ChangingHandler1", changeInfo.Data["key1"]); 	} }
Keywords: FiniteStateMachine|State|Machine