diff --git a/crates/web5/src/credentials/presentation_definition.rs b/crates/web5/src/credentials/presentation_definition.rs index 2997a880..f6a23e39 100644 --- a/crates/web5/src/credentials/presentation_definition.rs +++ b/crates/web5/src/credentials/presentation_definition.rs @@ -238,55 +238,3 @@ impl JsonSchemaBuilder { }) } } - -// #[cfg(test)] -// mod test_vectors { -// use std::collections::HashSet; - -// use crate::test_helpers::TestVectorFile; - -// use super::PresentationDefinition; - -// #[derive(Debug, serde::Deserialize)] -// struct VectorInput { -// #[serde(rename = "presentationDefinition")] -// pub presentation_definition: PresentationDefinition, -// #[serde(rename = "credentialJwts")] -// pub credential_jwts: Vec, -// } - -// #[derive(Debug, serde::Deserialize)] -// struct VectorOutput { -// #[serde(rename = "selectedCredentials")] -// pub selected_credentials: Vec, -// } - -// #[test] -// #[ignore] // TODO temporarily ignoring, because web5-spec test vectors use did:key which isn't supported -// fn test_web5_spec_test_vectors() { -// let path = "presentation_exchange/select_credentials.json"; -// let vectors: TestVectorFile = -// TestVectorFile::load_from_path(path); - -// for vector in vectors.vectors { -// let presentation_definition = vector.input.presentation_definition; -// let vc_jwts = vector.input.credential_jwts; -// let error_msg = format!( -// "Selected Credential test vector ({}) should not have thrown error", -// vector.description -// ); - -// let selected_credentials = presentation_definition -// .select_credentials(&vc_jwts) -// .expect(&error_msg); - -// let set1: HashSet<_> = selected_credentials.iter().collect(); -// let set2: HashSet<_> = vector.output.selected_credentials.iter().collect(); -// assert_eq!( -// set1, set2, -// "Vectors do not contain the same elements: {}", -// error_msg -// ); -// } -// } -// } diff --git a/crates/web5/src/dids/methods/did_jwk.rs b/crates/web5/src/dids/methods/did_jwk.rs index d100048b..d59e6d1e 100644 --- a/crates/web5/src/dids/methods/did_jwk.rs +++ b/crates/web5/src/dids/methods/did_jwk.rs @@ -115,71 +115,3 @@ impl DidJwk { } } } - -// #[cfg(test)] -// mod test_vectors { -// use crate::{ -// dids::{ -// data_model::document::Document, -// resolution::{ -// document_metadata::DocumentMetadata, resolution_metadata::ResolutionMetadata, -// }, -// }, -// test_helpers::TestVectorFile, -// }; - -// #[derive(Debug, PartialEq, serde::Deserialize)] -// struct VectorOutput { -// #[serde(rename = "@context")] -// context: String, -// #[serde(rename = "didDocument")] -// did_document: Option, -// #[serde(rename = "didDocumentMetadata")] -// did_document_metadata: DocumentMetadata, -// #[serde(rename = "didResolutionMetadata")] -// did_resolution_metadata: ResolutionMetadata, -// } - -// #[test] -// fn test_web5_spec_did_jwk_test_vectors() { -// let path = "did_jwk/resolve.json"; -// let vectors: TestVectorFile = TestVectorFile::load_from_path(path); - -// for vector in vectors.vectors { -// let did_uri = vector.input; -// let resolution_result = super::DidJwk::resolve(&did_uri); - -// let all_none = vector.output.did_document_metadata.created.is_none() -// && vector.output.did_document_metadata.updated.is_none() -// && vector.output.did_document_metadata.deactivated.is_none() -// && vector.output.did_document_metadata.next_update.is_none() -// && vector.output.did_document_metadata.version_id.is_none() -// && vector -// .output -// .did_document_metadata -// .next_version_id -// .is_none() -// && vector.output.did_document_metadata.equivalent_id.is_none() -// && vector.output.did_document_metadata.canonical_id.is_none(); - -// let vector_document_metadata = if all_none { -// None -// } else { -// Some(vector.output.did_document_metadata.clone()) -// }; - -// assert_eq!( -// resolution_result.resolution_metadata, vector.output.did_resolution_metadata, -// "Resolution metadata does not match." -// ); -// assert_eq!( -// resolution_result.document, vector.output.did_document, -// "DID Document does not match." -// ); -// assert_eq!( -// resolution_result.document_metadata, vector_document_metadata, -// "Document metadata does not match." -// ); -// } -// } -// }