mithril_cardano_node_internal_database/test/fake_data.rs
1//! Fake data builders for testing.
2use std::path::PathBuf;
3
4use mithril_common::entities::ImmutableFileNumber;
5
6use crate::entities::*;
7
8/// Fake [ImmutableFile], bypass the checks done by [ImmutableFile::new].
9pub fn immutable_file<T: Into<String>>(
10 path: PathBuf,
11 number: ImmutableFileNumber,
12 filename: T,
13) -> ImmutableFile {
14 ImmutableFile {
15 path,
16 number,
17 filename: filename.into(),
18 }
19}