I'm creating an object pool in AS3 that uses a stack as its base data structure (implemented with a linked list). I'm new to FlexUnit, but I'd really like to have some unit tests for my classes (as testing them in a new project would be cumbersome at best).
I've run into some problems trying to track variables, though, as my class members aren't public; I want to be able to test my private methods that only affect members of the class. (Examples include creation of the list, popping a node off of the stack, pushing a node back onto the stack, etc.)
FlexUnit's practices seem to state that you have a separate test class that runs test methods against your classes. However, these classes won't have access to my private variables, and I don't want to have to create getters and setters just for the unit tests. Is there a way around this? Can test methods be added inside the class itself, Python-style, instead of in a test case class?
I apologize if this has been asked before. I'm new to this; I appreciate your help. Let me know if I need to clarify with code snippets or anything.
Edit: I've realized that my data structure is actually a stack, not just a generic linked list. I've updated the question to reflect this.