## ----setup, include=FALSE-----------------------------------------------------
knitr::opts_chunk$set(collapse=TRUE,comment="#>")
library(financialinstrumentsaccounting)

## -----------------------------------------------------------------------------
data <- load_reference_data("SMALL_SA_RETAIL_FIA")
selected <- select_snapshot(list(instruments=data$instruments),"2026-12-31",
                            "2026-09-02T12:00:00+02:00")
stopifnot(length(selected$instruments)==5)

## -----------------------------------------------------------------------------
result <- run_dataset(data)
controls <- get_controls(result)
stopifnot(length(controls)==28,
          all(vapply(controls,function(x)x$status=="PASS",logical(1))))
lineage <- get_lineage(result)
lineage[c("contract_version","policy_id","rule_set_id","run_id")]

## -----------------------------------------------------------------------------
sources <- get_sources()
stopifnot(all(!vapply(sources,function(x)x$redistributed,logical(1))))

