[minor] Refactored
This commit is contained in:
parent
a922495b46
commit
12385d3a85
1 changed files with 8 additions and 15 deletions
|
@ -10,51 +10,44 @@ struct TestFlavour {
|
||||||
scenarii: Vec<scenarii::ItemScenario>,
|
scenarii: Vec<scenarii::ItemScenario>,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(not(feature = "local_calendar_mocks_remote_calendars"))]
|
||||||
impl TestFlavour {
|
impl TestFlavour {
|
||||||
#[cfg(not(feature = "local_calendar_mocks_remote_calendars"))]
|
|
||||||
pub fn normal() -> Self { Self{} }
|
pub fn normal() -> Self { Self{} }
|
||||||
#[cfg(not(feature = "local_calendar_mocks_remote_calendars"))]
|
|
||||||
pub fn first_sync_to_local() -> Self { Self{} }
|
pub fn first_sync_to_local() -> Self { Self{} }
|
||||||
#[cfg(not(feature = "local_calendar_mocks_remote_calendars"))]
|
|
||||||
pub fn first_sync_to_server() -> Self { Self{} }
|
pub fn first_sync_to_server() -> Self { Self{} }
|
||||||
#[cfg(not(feature = "local_calendar_mocks_remote_calendars"))]
|
|
||||||
pub fn transient_task() -> Self { Self{} }
|
pub fn transient_task() -> Self { Self{} }
|
||||||
|
|
||||||
#[cfg(feature = "local_calendar_mocks_remote_calendars")]
|
pub async fn run(&self) {
|
||||||
|
println!("WARNING: This test required the \"integration_tests\" Cargo feature");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "local_calendar_mocks_remote_calendars")]
|
||||||
|
impl TestFlavour {
|
||||||
pub fn normal() -> Self {
|
pub fn normal() -> Self {
|
||||||
Self {
|
Self {
|
||||||
scenarii: scenarii::scenarii_basic(),
|
scenarii: scenarii::scenarii_basic(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "local_calendar_mocks_remote_calendars")]
|
|
||||||
pub fn first_sync_to_local() -> Self {
|
pub fn first_sync_to_local() -> Self {
|
||||||
Self {
|
Self {
|
||||||
scenarii: scenarii::scenarii_first_sync_to_local(),
|
scenarii: scenarii::scenarii_first_sync_to_local(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "local_calendar_mocks_remote_calendars")]
|
|
||||||
pub fn first_sync_to_server() -> Self {
|
pub fn first_sync_to_server() -> Self {
|
||||||
Self {
|
Self {
|
||||||
scenarii: scenarii::scenarii_first_sync_to_server(),
|
scenarii: scenarii::scenarii_first_sync_to_server(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "local_calendar_mocks_remote_calendars")]
|
|
||||||
pub fn transient_task() -> Self {
|
pub fn transient_task() -> Self {
|
||||||
Self {
|
Self {
|
||||||
scenarii: scenarii::scenarii_transient_task(),
|
scenarii: scenarii::scenarii_transient_task(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#[cfg(not(feature = "local_calendar_mocks_remote_calendars"))]
|
|
||||||
pub async fn run(&self) {
|
|
||||||
println!("WARNING: This test required the \"integration_tests\" Cargo feature");
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(feature = "local_calendar_mocks_remote_calendars")]
|
|
||||||
pub async fn run(&self) {
|
pub async fn run(&self) {
|
||||||
let mut provider = scenarii::populate_test_provider_before_sync(&self.scenarii).await;
|
let mut provider = scenarii::populate_test_provider_before_sync(&self.scenarii).await;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue