aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/app/export_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/app/export_test.go')
-rw-r--r--internal/app/export_test.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/app/export_test.go b/internal/app/export_test.go
new file mode 100644
index 00000000..b7ee7f73
--- /dev/null
+++ b/internal/app/export_test.go
@@ -0,0 +1,22 @@
+package app
+
+import (
+ "hakurei.app/container"
+ "hakurei.app/internal/app/state"
+ "hakurei.app/internal/sys"
+ "hakurei.app/system"
+)
+
+func NewWithID(id state.ID, os sys.State) *App {
+ a := new(App)
+ a.id = newID(&id)
+ a.sys = os
+ return a
+}
+
+func AppIParams(a *App, seal *Outcome) (*system.I, *container.Params) {
+ if a.outcome != seal || a.id != seal.id {
+ panic("broken app/outcome link")
+ }
+ return seal.sys, seal.container
+}