-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easy testing of business logic #1
Comments
Potentially blocked by #14 since we basically want to change from operating on the real nodes to the schema nodes. However, we could also still use the real nodes and then use the protocol output to operate on a schema node tree without doing #14. This is probably where to start since #14 is being deprioritized due to how we are going to deploy the project. |
In order to avoid yet-another code generation module, I think we can do this by parsing the schema again at runtime and building an in-memory version of the NodeFactory which factories schema nodes. The downside is that if you do this incorrectly you parse the schema each time. It's probably fast enough to not matter, I guess we'll find out. We also need to expose the clock ticking mechanism so you can control when frames occur. For now we'll probably just go with direct BroadcastFrameClock usage to get off the ground, but it seems like there should be a 'treehouse' artifact that has the compose+display integration that seems to get repeated on each platform and can also have the testing version of that integration. |
This approach doesn't work anywhere except the JVM because of the use of kotlin-reflect-full which only works on JVM. Maybe that's fine for now, but isn't great long-term. |
I’d like to build out test infrastructure. A sketch of how it might work:
The renderer’s root is a Kotlin value object of the most recently composed view.
We could make it so onClick() automatically recomposes, or we could make it explicit.
The text was updated successfully, but these errors were encountered: