public void PoolCantHaveZeroCapacity() { Assert.ThrowsException <Pool <Test> .PoolException>(() => { var _ = new GMTK.Pool <Test>(0); }); }
public void PoolWillThrowErrorIfPollutedFromOutside() { Pool <Test> pool = new GMTK.Pool <Test>(100); var test = new Test(); Assert.ThrowsException <Pool <Test> .PoolException>(() => { pool.Release(ref test); }); }
public void PoolWillThrowErrorIfExertedOverCapacity() { Pool <Test> pool = new GMTK.Pool <Test>(1); var _ = pool.Acquire(); Assert.ThrowsException <Pool <Test> .PoolException>(() => { var _ = pool.Acquire(); }); }