mod prepare_tests; #[tokio::test] async fn test_query_for_entity_array() -> Result<(), Box> { let mut client = prepare_tests::prepare_test().await?; let entities = client.query_for_entity_array("#person").await?.entities; let name_strings = entities .iter() .map(|e| e.name.clone().unwrap()) .collect::>(); let names = name_strings .iter() .map(|s| s.as_str()) .collect::>(); let expected_names = [ "Demond_Gutkowski", "Gladys_Cole", "Margret_Tremblay", "Jimen_Bradly", "Joaquin_Jacobs", "Kayleigh_Gibson", "Katlyn_Howell", "Harry_Lindgren", "Tobin_D_Amore", "Breana_Lesch", ]; expected_names .iter() .for_each(|name| assert!(names.contains(name))); let result = client.query_for_entity_array("asdf").await; assert!(result.is_err()); Ok(()) }