use crate::{
    codegen::SvgDocument,
    types::nodes::primitives::turbulence::{NoiseType, StitchTiles},
};

#[test]
fn test_simple_turbulence() {
    let mut doc = SvgDocument::new();

    let noise = doc.create_filter("noise");

    noise.turbulence(
        0.01,
        0.01,
        1,
        0,
        StitchTiles::Stitch,
        NoiseType::FractalNoise,
    );

    assert_eq!(
        doc.generate_svg(),
        r#"<svg><filter id="noise"><feTurbulence baseFrequency="0.01 0.01" stitchTiles="stitch" type="fractalNoise"/></filter></svg>"#
    );
}
