pub struct PluginTestFixture {
pub security_policy: SecurityPolicy,
pub plugins: Vec<Box<dyn Plugin>>,
pub manifests: Vec<PluginManifest>,
}Expand description
Plugin test fixture for comprehensive testing scenarios
PluginTestFixture provides a complete testing environment with pre-configured plugins, validation scenarios, and test data for thorough plugin testing.
§Examples
ⓘ
use sklears_core::plugin::PluginTestFixture;
let fixture = PluginTestFixture::new();
let plugins = fixture.create_test_plugins();
assert!(!plugins.is_empty());
let manifests = fixture.create_test_manifests();
assert!(!manifests.is_empty());Fields§
§security_policy: SecurityPolicySecurity policy for testing
plugins: Vec<Box<dyn Plugin>>Test plugins
manifests: Vec<PluginManifest>Test manifests
Implementations§
Source§impl PluginTestFixture
impl PluginTestFixture
Sourcepub fn with_strict_security() -> Self
pub fn with_strict_security() -> Self
Create test fixture with strict security policy
Sourcepub fn create_test_plugins(&self) -> Vec<Box<dyn Plugin>>
pub fn create_test_plugins(&self) -> Vec<Box<dyn Plugin>>
Create a set of test plugins covering various scenarios
§Returns
Vector of test plugins with different configurations and behaviors.
Sourcepub fn create_test_manifests(&self) -> Vec<PluginManifest>
pub fn create_test_manifests(&self) -> Vec<PluginManifest>
Create test manifests for validation testing
§Returns
Vector of plugin manifests with various security profiles and configurations.
Sourcepub fn create_test_configs(&self) -> Vec<PluginConfig>
pub fn create_test_configs(&self) -> Vec<PluginConfig>
Create test plugin configurations
§Returns
Vector of plugin configurations for testing various scenarios.
Trait Implementations§
Source§impl Debug for PluginTestFixture
impl Debug for PluginTestFixture
Auto Trait Implementations§
impl Freeze for PluginTestFixture
impl !RefUnwindSafe for PluginTestFixture
impl Send for PluginTestFixture
impl Sync for PluginTestFixture
impl Unpin for PluginTestFixture
impl !UnwindSafe for PluginTestFixture
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more