The goal of this PR is to ensure that Mastodons very important undo/redo mechanism works properly. I there for added a unit test ModelUndoRedoTest. The unit test uses the ModelUtils.dump(...) method to convert the current status of the Model into a string. Converting the model status into string allows me to test if the model is correctly rolled back into a specific (previously) recorded state.
It was necessary to extend the ModelUtils.dump(...) method to also print the tag sets. (The undo redo mechanism handle tags as well.)
There is a PR to fix a small problem in Mastodon's undo/redo mechanism: https://github.com/mastodon-sc/mastodon-collection/pull/16
The goal of this PR is to ensure that Mastodons very important undo/redo mechanism works properly. I there for added a unit test
ModelUndoRedoTest
. The unit test uses theModelUtils.dump(...)
method to convert the current status of theModel
into a string. Converting the model status into string allows me to test if the model is correctly rolled back into a specific (previously) recorded state.It was necessary to extend the
ModelUtils.dump(...)
method to also print the tag sets. (The undo redo mechanism handle tags as well.)