KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Suppose I have an Order class, which can be in three different states : CheckedState , PaidState and OrderedState . The state machine will be implemented using the standard State Design Pattern (Gof). How do you usually unit test this? Do you use a fixture for each state class ( CheckStateFixture , PaidFixture , ...) and one another ( OrderFixture ) for the context class? Or do you use only one fixture for the context class ( Order ) in which you'll put all the unit tests?
Tags (comma-separated)
Save Edits
Cancel