arcature 2026.2.1

Arcature application framework: a high-level Application facade over the certified Arcature subsystems, with the low-level Axum/Tower escape hatch preserved.
Documentation
//! Construction and escape-hatch behavior of [`App`].
//!
//! Verifies that an empty app constructs, a raw Axum router can enter Arcature
//! and leave it again, and the round trip preserves the router.

use arcature::App;
use arcature::axum::Router;

#[test]
fn empty_app_constructs() {
    let _app = App::default();
}

#[test]
fn raw_router_enters_arcature() {
    let router: Router<()> = Router::new();
    let app = App::from_router(router);
    // The app wraps the router; leaving Arcature returns a usable router.
    let _recovered: Router<()> = app.into_router();
}

#[test]
fn arcature_router_leaves_arcature() {
    let app: App<()> = App::default();
    let router: Router<()> = app.into_router();
    // A freshly-built App wraps a fresh Router; recovered router is usable.
    let _again = App::from_router(router);
}

#[test]
fn round_trip_preserves_router() {
    use arcature::axum::routing::get;
    let raw: Router<()> = Router::new().route("/", get(|| async { "hello" }));
    let app = App::from_router(raw);
    let recovered: Router<()> = app.into_router();
    // Re-wrap and unwrap; the route survives the round trip (compile + presence).
    let app2 = App::from_router(recovered);
    let _final_router: Router<()> = app2.into_router();
}