Skip to main content

lower_unit_test

Function lower_unit_test 

Source
pub(super) fn lower_unit_test(
    test: &UnitTest,
    target_stmt: &Statement,
    target_fqn: &FullyQualifiedName,
) -> Result<Vec<String>, String>
Expand description

Lower a unit test into executable SQL statements.

Returns a vector of SQL strings in order:

  1. CREATE TEMPORARY VIEW for each mock
  2. CREATE TEMPORARY VIEW for expected
  3. CREATE TEMPORARY VIEW for the target (flattened)
  4. Test query with status column