backbone-catalog 0.7.0

Canonical product/service identity: Item, Item Group, UOM (Indonesia-first)
Documentation
//! Integration Tests for catalog
//!
//! Generated by metaphor-schema. Do not edit manually.
//!
//! Run with: cargo test --package backbone-catalog --test integration_tests

#![recursion_limit = "512"]

mod integration;

use integration::tests::*;

#[tokio::test]
async fn test_attribute_api() {
    let mut test = AttributeApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_attribute_value_api() {
    let mut test = AttributeValueApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_brand_api() {
    let mut test = BrandApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_item_api() {
    let mut test = ItemApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_item_group_api() {
    let mut test = ItemGroupApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_item_variant_api() {
    let mut test = ItemVariantApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_uom_api() {
    let mut test = UomApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}

#[tokio::test]
async fn test_uom_conversion_api() {
    let mut test = UomConversionApiTest::new();
    let results = test.run_all().await;

    let failed: Vec<_> = results.iter().filter(|r| !r.success).collect();
    if !failed.is_empty() {
        for f in &failed {
            eprintln!("FAILED: {} - {}", f.test_name, f.details);
        }
        panic!("{} tests failed", failed.len());
    }
}