1
1
mod fixtures;
2
2
3
3
use did_doc:: schema:: did_doc:: DidDocument ;
4
- use did_peer:: resolver:: { options:: { PublicKeyEncoding } , PeerDidResolutionOptions , PeerDidResolver } ;
4
+ use did_peer:: resolver:: { options:: PublicKeyEncoding , PeerDidResolutionOptions , PeerDidResolver } ;
5
5
use did_resolver:: traits:: resolvable:: DidResolvable ;
6
6
use tokio:: test;
7
7
@@ -24,24 +24,42 @@ async fn resolve_positive_test(did_doc: &str, peer_did: &str, options: PeerDidRe
24
24
25
25
#[ test]
26
26
async fn test_resolve_numalgo2_basic ( ) {
27
- let options = PeerDidResolutionOptions { encoding : Some ( PublicKeyEncoding :: Base58 ) } ;
27
+ let options = PeerDidResolutionOptions {
28
+ encoding : Some ( PublicKeyEncoding :: Base58 ) ,
29
+ } ;
28
30
resolve_positive_test ( DID_DOC_BASIC , PEER_DID_NUMALGO_2_BASIC , options) . await ;
29
31
}
30
32
31
33
#[ test]
32
34
async fn test_resolve_numalgo2_multiple_services ( ) {
33
- let options = PeerDidResolutionOptions { encoding : Some ( PublicKeyEncoding :: Multibase ) } ;
34
- resolve_positive_test ( DID_DOC_MULTIPLE_SERVICES , PEER_DID_NUMALGO_2_MULTIPLE_SERVICES , options) . await ;
35
+ let options = PeerDidResolutionOptions {
36
+ encoding : Some ( PublicKeyEncoding :: Multibase ) ,
37
+ } ;
38
+ resolve_positive_test (
39
+ DID_DOC_MULTIPLE_SERVICES ,
40
+ PEER_DID_NUMALGO_2_MULTIPLE_SERVICES ,
41
+ options,
42
+ )
43
+ . await ;
35
44
}
36
45
37
46
#[ test]
38
47
async fn test_resolve_numalgo2_no_routing_keys ( ) {
39
- let options = PeerDidResolutionOptions { encoding : Some ( PublicKeyEncoding :: Multibase ) } ;
40
- resolve_positive_test ( DID_DOC_NO_ROUTING_KEYS , PEER_DID_NUMALGO_2_NO_ROUTING_KEYS , options) . await ;
48
+ let options = PeerDidResolutionOptions {
49
+ encoding : Some ( PublicKeyEncoding :: Multibase ) ,
50
+ } ;
51
+ resolve_positive_test (
52
+ DID_DOC_NO_ROUTING_KEYS ,
53
+ PEER_DID_NUMALGO_2_NO_ROUTING_KEYS ,
54
+ options,
55
+ )
56
+ . await ;
41
57
}
42
58
43
59
#[ test]
44
60
async fn test_resolve_numalgo2_no_services ( ) {
45
- let options = PeerDidResolutionOptions { encoding : Some ( PublicKeyEncoding :: Multibase ) } ;
61
+ let options = PeerDidResolutionOptions {
62
+ encoding : Some ( PublicKeyEncoding :: Multibase ) ,
63
+ } ;
46
64
resolve_positive_test ( DID_DOC_NO_SERVICES , PEER_DID_NUMALGO_2_NO_SERVICES , options) . await ;
47
65
}
0 commit comments