i5-add-tests (part 4) #10

Merged
kemitix merged 39 commits from i5-add-tests into main 2023-08-05 06:50:01 +01:00
Showing only changes of commit d5b54a75d3 - Show all commits

View file

@ -8,6 +8,7 @@ use tempfile::{tempdir, TempDir};
use crate::{ use crate::{
errors::Error, errors::Error,
file::{FileAppendLineFn, FileOpenFn},
network::{NetworkDownloadAsMp3Fn, NetworkFetchAsBytesFn, NetworkFetchAsTextFn}, network::{NetworkDownloadAsMp3Fn, NetworkFetchAsBytesFn, NetworkFetchAsTextFn},
prelude::*, prelude::*,
}; };
@ -45,3 +46,9 @@ pub fn stub_fetch_as_bytes() -> NetworkFetchAsBytesFn {
pub fn stub_download_as_mp3() -> NetworkDownloadAsMp3Fn { pub fn stub_download_as_mp3() -> NetworkDownloadAsMp3Fn {
Box::new(|_url: &str| Err(Error::message("Not implemented"))) Box::new(|_url: &str| Err(Error::message("Not implemented")))
} }
pub fn stub_file_open() -> FileOpenFn {
Box::new(|_path: &str| Err(Error::message("Not implemented")))
}
pub fn stub_file_append_line() -> FileAppendLineFn {
Box::new(|_: &str, _: &str| Err(Error::message("Not implemented")))
}