public void RenderSubscribeTest() { var store = new Store <State>(new State()); var render = new SampleRender(); store.AddRenderer(render.Render); store.Dispatch(new Action()); store.ForceUpdate(); Assert.AreEqual(1, render.Count); store.Dispatch(new Action()); store.ForceUpdate(); Assert.AreEqual(2, render.Count); store.RemoveRenderer(render.Render); store.Dispatch(new Action()); store.ForceUpdate(); Assert.AreEqual(2, render.Count); }
public sample(string n, SampleRender r) { name = n; render = r; }