#[cfg(test)]
mod color_transform_hue_rotate_test {
    use plutofilter_rs::{ImageEditor, get_resource_path};
    type Result<T> = std::result::Result<T, Box<dyn std::error::Error>>;
    #[test]
    fn color_transform_hue_rotate_test_0() -> Result<()> {
        let base_file = get_resource_path(&["original_images"], "zhang-hanyun.jpg");
        let mut editor = ImageEditor::open(base_file);
        editor = editor.color_transform_hue_rotate(0.0);

        let output_path = get_resource_path(
            &["test_output_images", "color_transform_hue_rotate"],
            "000.png",
        );
        editor.save_to(output_path)?;

        Ok(())
    }
    #[test]
    fn color_transform_hue_rotate_test_030() -> Result<()> {
        let base_file = get_resource_path(&["original_images"], "zhang-hanyun.jpg");
        let mut editor = ImageEditor::open(base_file);
        editor = editor.color_transform_hue_rotate(30.0);

        let output_path = get_resource_path(
            &["test_output_images", "color_transform_hue_rotate"],
            "030.png",
        );
        editor.save_to(output_path)?;

        Ok(())
    }

    #[test]
    fn color_transform_hue_rotate_test_090() -> Result<()> {
        let base_file = get_resource_path(&["original_images"], "zhang-hanyun.jpg");
        let mut editor = ImageEditor::open(base_file);
        editor = editor.color_transform_hue_rotate(90.0);

        let output_path = get_resource_path(
            &["test_output_images", "color_transform_hue_rotate"],
            "090.png",
        );
        editor.save_to(output_path)?;

        Ok(())
    }
    #[test]
    fn color_transform_hue_rotate_test_180() -> Result<()> {
        let base_file = get_resource_path(&["original_images"], "zhang-hanyun.jpg");
        let mut editor = ImageEditor::open(base_file);
        editor = editor.color_transform_hue_rotate(180.0);

        let output_path = get_resource_path(
            &["test_output_images", "color_transform_hue_rotate"],
            "180.png",
        );
        editor.save_to(output_path)?;

        Ok(())
    }
    #[test]
    fn color_transform_hue_rotate_test_270() -> Result<()> {
        let base_file = get_resource_path(&["original_images"], "zhang-hanyun.jpg");
        let mut editor = ImageEditor::open(base_file);
        editor = editor.color_transform_hue_rotate(270.0);

        let output_path = get_resource_path(
            &["test_output_images", "color_transform_hue_rotate"],
            "270.png",
        );
        editor.save_to(output_path)?;

        Ok(())
    }
    #[test]
    fn color_transform_hue_rotate_test_360() -> Result<()> {
        let base_file = get_resource_path(&["original_images"], "zhang-hanyun.jpg");
        let mut editor = ImageEditor::open(base_file);
        editor = editor.color_transform_hue_rotate(360.0);

        let output_path = get_resource_path(
            &["test_output_images", "color_transform_hue_rotate"],
            "360.png",
        );
        editor.save_to(output_path)?;

        Ok(())
    }
}
