public void TestCompleteFlow() { PoolFactory.RegisterPool <TypeTwo>(); // Specify a value to have some instances of objects according to your needs PoolFactory.RegisterPool <TypeOne>(10); TypeOne obj_0 = PoolFactory.GetObject <TypeOne>(); // Use methods with "_E" if you want throw Exception TypeTwo obj_1 = PoolFactory.GetObject_E <TypeTwo>(); PoolFactory.Recycle(ref obj_0); }
public void TestGetTypeNotPresentThrowException() { RegisterPoolAndAssertion <TypeOne>(1); TypeTwo obj = PoolFactory.GetObject_E <TypeTwo>(); }