use pixelsrc::prime::{get_primer, list_sections, PrimerSection};
#[test]
fn test_prime_full() {
let content = get_primer(PrimerSection::Full, false);
assert!(content.contains("# Pixelsrc Primer"), "Should have primer title");
assert!(content.contains("## Format Quick Reference"), "Should have format section");
assert!(content.contains("## Complete Example"), "Should have examples section");
assert!(content.contains("## Best Practices"), "Should have tips section");
}
#[test]
fn test_prime_brief() {
let content = get_primer(PrimerSection::Full, true);
assert!(content.contains("# Pixelsrc Quick Reference"), "Should have brief title");
assert!(content.len() < 3500, "Brief version should be under 3500 chars");
}
#[test]
fn test_prime_format_section() {
let content = get_primer(PrimerSection::Format, false);
assert!(content.contains("## Format Quick Reference"), "Should have format heading");
assert!(content.contains("Object Types"), "Should describe object types");
}
#[test]
fn test_prime_examples_section() {
let content = get_primer(PrimerSection::Examples, false);
assert!(content.contains("## Complete Example"), "Should have examples heading");
assert!(content.contains("coin"), "Should include coin example");
}
#[test]
fn test_prime_tips_section() {
let content = get_primer(PrimerSection::Tips, false);
assert!(content.contains("## Best Practices"), "Should have tips heading");
assert!(content.contains("DO"), "Should have DO recommendations");
}
#[test]
fn test_prime_list_sections() {
let sections = list_sections();
assert!(sections.contains(&"format"), "Should have format section");
assert!(sections.contains(&"examples"), "Should have examples section");
assert!(sections.contains(&"tips"), "Should have tips section");
assert!(sections.contains(&"full"), "Should have full section");
assert_eq!(sections.len(), 4, "Should have exactly 4 sections");
}