pub struct MockTestLayer<T: TestLayerTag> { /* private fields */ }_test only.Implementations§
Source§impl<T: TestLayerTag> MockTestLayer<T>
impl<T: TestLayerTag> MockTestLayer<T>
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new method can still be called
like <MockX as TraitY>::new
Source§impl<T: TestLayerTag> MockTestLayer<T>
impl<T: TestLayerTag> MockTestLayer<T>
Sourcepub fn expect_manifest(&mut self) -> &mut Expectation<T>
pub fn expect_manifest(&mut self) -> &mut Expectation<T>
Create an Expectation for mocking the manifest method
Sourcepub fn expect_hooked_global_commands(&mut self) -> &mut Expectation<T>
pub fn expect_hooked_global_commands(&mut self) -> &mut Expectation<T>
Create an Expectation for mocking the hooked_global_commands method
Sourcepub fn expect_hooked_instance_commands(&mut self) -> &mut Expectation<T>
pub fn expect_hooked_instance_commands(&mut self) -> &mut Expectation<T>
Create an Expectation for mocking the hooked_instance_commands method
Sourcepub fn expect_hooked_device_commands(&mut self) -> &mut Expectation<T>
pub fn expect_hooked_device_commands(&mut self) -> &mut Expectation<T>
Create an Expectation for mocking the hooked_device_commands method
Sourcepub fn instance_context() -> Context<T>
pub fn instance_context() -> Context<T>
Create a Context for mocking the instance method
Sourcepub fn mock_context() -> Context<T>
pub fn mock_context() -> Context<T>
Create a Context for mocking the mock method
Source§impl<T: TestLayerTag> MockTestLayer<T>
impl<T: TestLayerTag> MockTestLayer<T>
Sourcepub fn set_default_expectations(&mut self)
pub fn set_default_expectations(&mut self)
Set the default behavior of the MockTestLayer: intercept no commands and a valid
LayerManifest.
Trait Implementations§
Source§impl<T: TestLayerTag> Default for MockTestLayer<T>
impl<T: TestLayerTag> Default for MockTestLayer<T>
Source§impl<T: TestLayerTag> TestLayerMock for MockTestLayer<T>
impl<T: TestLayerTag> TestLayerMock for MockTestLayer<T>
Source§type TestLayerType = TestLayer<T>
type TestLayerType = TestLayer<T>
Source§fn mock() -> &'static MockTestLayer<T>
fn mock() -> &'static MockTestLayer<T>
Source§fn manifest(&self) -> LayerManifest
fn manifest(&self) -> LayerManifest
Layer::manifest.Source§fn hooked_global_commands(&self) -> &[LayerVulkanCommand]
fn hooked_global_commands(&self) -> &[LayerVulkanCommand]
GlobalHooksInfo::hooked_commands.Source§fn hooked_instance_commands(&self) -> &[LayerVulkanCommand]
fn hooked_instance_commands(&self) -> &[LayerVulkanCommand]
InstanceInfo::hooked_commands.Source§fn hooked_device_commands(&self) -> &[LayerVulkanCommand]
fn hooked_device_commands(&self) -> &[LayerVulkanCommand]
DeviceInfo::hooked_commands.