How do you unit test the animation in the real world?
Let's say I have an animation that transitions between two different states of a view. I would like to check if the two states are fine at the beginning and at the end of the animation, but I don't have a way to do that without introducing delays in my unit test, and moreover it isn't really reliable.
IMHO a solution could be to introduce a flag in POPAnimation that simply disables the animations all together, and simply sets the property to their final states. In this way, the test could be run synchronously on a single thread, and the checks would be trivial.
What is your approach, and eventually what do you think about my solution?
How do you unit test the animation in the real world?
Let's say I have an animation that transitions between two different states of a view. I would like to check if the two states are fine at the beginning and at the end of the animation, but I don't have a way to do that without introducing delays in my unit test, and moreover it isn't really reliable.
IMHO a solution could be to introduce a flag in POPAnimation that simply disables the animations all together, and simply sets the property to their final states. In this way, the test could be run synchronously on a single thread, and the checks would be trivial.
What is your approach, and eventually what do you think about my solution?