public void TrySetDirtyShouldReturnFalseAfterFirstCall() { var dirtyTracker = new EntityDirtyTracker(); dirtyTracker.TrySetDirty(ComponentMap<ISimpleComponent>.Accessor).ShouldBeTrue(); dirtyTracker.TrySetDirty(ComponentMap<ISimpleComponent>.Accessor).ShouldBeFalse(); dirtyTracker.TrySetDirty(ComponentMap<ISimpleComponent>.Accessor).ShouldBeFalse(); }
public void TestResetSingleComponent() { var dirtyTracker = new EntityDirtyTracker(); dirtyTracker.TrySetDirty(ComponentMap<ISimpleComponent>.Accessor).ShouldBeTrue(); dirtyTracker.TrySetDirty(ComponentMap<ISimpleComponent>.Accessor).ShouldBeFalse(); dirtyTracker.Reset(ComponentMap<ISimpleComponent>.Accessor); dirtyTracker.TrySetDirty(ComponentMap<ISimpleComponent>.Accessor).ShouldBeTrue(); }