aboutsummaryrefslogtreecommitdiff
path: root/src/test_utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test_utils.rs')
-rw-r--r--src/test_utils.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/test_utils.rs b/src/test_utils.rs
index 1e0e04d..a304a71 100644
--- a/src/test_utils.rs
+++ b/src/test_utils.rs
@@ -289,6 +289,7 @@ pub mod mocks
use crate::di_container::blocking::binding::builder::BindingBuilder;
use crate::di_container::blocking::details::DIContainerInternals;
use crate::di_container::blocking::{BindingOptionsWithLt, IDIContainer};
+ use crate::di_container::BindingOptions;
use crate::errors::di_container::DIContainerError;
use crate::provider::blocking::IProvider;
use crate::ptr::SomePtr;
@@ -328,21 +329,24 @@ pub mod mocks
impl DIContainerInternals for DIContainer
{
- fn has_binding<Interface>(self: &Rc<Self>, name: Option<&'static str>) -> bool
+ fn has_binding<Interface>(
+ self: &Rc<Self>,
+ binding_options: BindingOptionsWithLt
+ ) -> bool
where
Interface: ?Sized + 'static;
#[doc(hidden)]
fn set_binding<Interface>(
self: &Rc<Self>,
- name: Option<&'static str>,
+ binding_options: BindingOptions<'static>,
provider: Box<dyn IProvider<Self>>,
) where
Interface: 'static + ?Sized;
fn remove_binding<Interface>(
self: &Rc<Self>,
- name: Option<&'static str>,
+ binding_options: BindingOptions<'static>,
) -> Option<Box<dyn IProvider<Self>>>
where
Interface: 'static + ?Sized;
@@ -406,21 +410,21 @@ pub mod mocks
{
async fn has_binding<Interface>(
self: &Arc<Self>,
- name: Option<&'static str>,
+ binding_options: BindingOptions<'static>,
) -> bool
where
Interface: ?Sized + 'static;
async fn set_binding<Interface>(
self: &Arc<Self>,
- name: Option<&'static str>,
+ binding_options: BindingOptions<'static>,
provider: Box<dyn IAsyncProvider<Self>>,
) where
Interface: 'static + ?Sized;
async fn remove_binding<Interface>(
self: &Arc<Self>,
- name: Option<&'static str>,
+ binding_options: BindingOptions<'static>,
) -> Option<Box<dyn IAsyncProvider<Self>>>
where
Interface: 'static + ?Sized;