public void ItRegistersStateControllers() { var store = new StateStore(); var controller = new CurrentHealthController(); store.AddController("CurrentHealth", controller); var currentHealth = store.GetState <float>("CurrentHealth"); Assert.AreEqual(currentHealth, controller.GetState()); }
public void AllIsWell() { var store = new StateStore(); store.AddController("CurrentHealth", new CurrentHealthController()); store.Dispatch(new StoreAction { Type = "UpdateCurrentHealth", Payload = 20f }); Assert.AreEqual(store.GetState <float>("CurrentHealth"), 20f); }