public void Remove() { var pool = new PoolCollectionRing <Target>(); var target = new Target(0); pool.Add(target); pool.Remove(); bool result0 = pool.Contains(target); Assert.False(result0); Assert.AreEqual(0, pool.Count); }
public void Add() { var pool = new PoolCollectionRing <Target>(); var target = new Target(0); pool.Add(target); bool result0 = pool.Contains(target); bool result1 = pool.IsDisabled(target); Assert.True(result0); Assert.True(result1); }
public void Disable() { var pool = new PoolCollectionRing <Target>(); pool.Add(new Target(0)); pool.Add(new Target(1)); Target target = pool.Enable(); pool.Disable(target); bool result0 = pool.IsDisabled(target); Assert.True(result0); }
public void Enable() { var pool = new PoolCollectionRing <Target>(); pool.Add(new Target(0)); pool.Add(new Target(1)); Target target0 = pool.Enable(); Target target1 = pool.Enable(); Target target2 = pool.Enable(); Assert.AreEqual(1, target0.Value); Assert.AreEqual(0, target1.Value); Assert.AreEqual(1, target2.Value); }