Registry testing - part 9

This commit is contained in:
Maurus Decimus
2026-03-19 19:29:17 +01:00
parent 7ae6654735
commit a67921f18c
57 changed files with 2886 additions and 1312 deletions

View File

@@ -646,6 +646,8 @@ pub trait JmapUtils {
self.text_field("description")
}
fn to_set_error(&self) -> JmapSetError;
fn with_property(self, field: impl Display, value: impl Into<Value>) -> Self;
fn text_field(&self, field: &str) -> &str;
@@ -668,6 +670,10 @@ impl JmapUtils for Value {
.unwrap_or_else(|| panic!("Missing {field} in object: {self:?}"))
}
fn to_set_error(&self) -> JmapSetError {
serde_json::from_str(&self.to_string()).expect("Failed to deserialize set error")
}
fn assert_is_equal(&self, expected: Value) {
if self != &expected {
panic!(