public static void TestStackable <T>(int count = 1) where T : IStackable, new() { var byteStack = new ByteStack(); for (int i = 0; i < count; i++) { byteStack.Add(new T()); } var stack = byteStack.Stack(); Assert.AreEqual(ByteStack.Unstack(stack).Stackables[0].GetType(), typeof(T)); Console.WriteLine(); Assert.Pass(); }