Started moving update tests into lib.

This commit is contained in:
2026-03-01 13:33:03 -05:00
parent 224096cbdb
commit 00d8283fb9
6 changed files with 88 additions and 12 deletions

View File

@@ -5,6 +5,19 @@ pub fn random_name() -> Name {
Name::english(Uuid::new_v4().to_string().as_str())
}
pub fn setup_range(count: usize) -> (MoreThanText, TestDocument) {
let mut mtt = MoreThanText::new();
let test_doc = TestDocument::new(vec![FieldType::Integer]);
mtt.create_document(test_doc.get_docdef()).unwrap();
let mut data: Vec<Vec<i128>> = Vec::new();
for i in 0..count {
let holder: i128 = i.try_into().unwrap();
data.push(vec![holder]);
}
test_doc.populate_multiple(&mut mtt, data);
(mtt, test_doc)
}
pub struct TestDocument {
doc_name: Name,
field_names: Vec<Name>,