Started moving update tests into lib.
This commit is contained in:
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user