#![allow(unexpected_cfgs)]
pub mod descriptor;
pub mod script_file;
pub mod script_reader;
pub mod script_types;
pub use drasi_lib::bootstrap::ScriptFileBootstrapConfig;
pub use script_file::{ScriptFileBootstrapProvider, ScriptFileBootstrapProviderBuilder};
#[cfg(feature = "dynamic-plugin")]
drasi_plugin_sdk::export_plugin!(
plugin_id = "scriptfile-bootstrap",
core_version = env!("CARGO_PKG_VERSION"),
lib_version = env!("CARGO_PKG_VERSION"),
plugin_version = env!("CARGO_PKG_VERSION"),
source_descriptors = [],
reaction_descriptors = [],
bootstrap_descriptors = [descriptor::ScriptFileBootstrapDescriptor],
);
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_scriptfile_bootstrap_builder_empty() {
let provider = ScriptFileBootstrapProviderBuilder::new().build();
let _ = provider;
}
#[test]
fn test_scriptfile_bootstrap_builder_single_file() {
let provider = ScriptFileBootstrapProviderBuilder::new()
.with_file("/path/to/file.jsonl")
.build();
let _ = provider;
}
#[test]
fn test_scriptfile_bootstrap_builder_multiple_files() {
let provider = ScriptFileBootstrapProviderBuilder::new()
.with_file("/path/to/file1.jsonl")
.with_file("/path/to/file2.jsonl")
.with_file("/path/to/file3.jsonl")
.build();
let _ = provider;
}
#[test]
fn test_scriptfile_bootstrap_builder_with_file_paths() {
let paths = vec![
"/data/nodes.jsonl".to_string(),
"/data/relations.jsonl".to_string(),
];
let provider = ScriptFileBootstrapProviderBuilder::new()
.with_file_paths(paths)
.build();
let _ = provider;
}
#[test]
fn test_scriptfile_bootstrap_from_provider_method() {
let provider = ScriptFileBootstrapProvider::builder()
.with_file("/initial/data.jsonl")
.build();
let _ = provider;
}
#[test]
fn test_scriptfile_bootstrap_builder_default() {
let provider = ScriptFileBootstrapProviderBuilder::default().build();
let _ = provider;
}
#[test]
fn test_scriptfile_bootstrap_provider_default() {
let provider = ScriptFileBootstrapProvider::default();
let _ = provider;
}
#[test]
fn test_scriptfile_bootstrap_new_with_config() {
let config = ScriptFileBootstrapConfig {
file_paths: vec!["/bootstrap/nodes.jsonl".to_string()],
};
let provider = ScriptFileBootstrapProvider::new(config);
let _ = provider;
}
#[test]
fn test_scriptfile_bootstrap_with_paths() {
let provider = ScriptFileBootstrapProvider::with_paths(vec![
"/bootstrap/nodes.jsonl".to_string(),
"/bootstrap/relations.jsonl".to_string(),
]);
let _ = provider;
}
}