|
1 | 1 | # Pairing Methods Validation Test Cases |
2 | 2 |
|
3 | 3 |
|
4 | | -## 1. Peer B matches the required list and the optional list |
| 4 | +## 1. Peer B matches URI's list exactly |
5 | 5 |
|
6 | 6 | ### Peer A's pairing uri: |
7 | | - uri = "...req-methods="wc_sessionPropose,wc_authRequest"&opt-methods="wc_authBatchRequest"" |
| 7 | + uri = "...methods=[wc_sessionPropose],[wc_authRequest,wc_authBatchRequest]" |
| 8 | + |
8 | 9 |
|
9 | 10 | ### Peer B's registered methods: |
10 | | - var requiredList = ["wc_sessionPropose", "wc_authRequest"] |
11 | | - var optionalList = ["wc_authBatchRequest"] |
| 11 | + var registeredMethods = [{ method = "wc_sessionPropose", type = ProtocolType.Sign }, { method = "wc_authRequest", type = ProtocolType.Auth }, { method = "wc_authBatchRequest", type = ProtocolType.Auth }] |
12 | 12 |
|
13 | 13 |
|
14 | 14 | is valid? Yes |
15 | 15 |
|
16 | 16 | --- |
17 | 17 |
|
18 | | -## 2. Peer B matches the required list and partially matches the optional list |
| 18 | +## 2. Peer B matches one inner array exactly and partially matches another inner array |
19 | 19 |
|
20 | 20 | ### Peer A's pairing uri: |
21 | | - uri = "...req-methods="wc_sessionPropose"&opt-methods="wc_authBatchRequest,wc_pushMessage"" |
| 21 | + uri = "...methods=[wc_sessionPropose],[wc_authBatchRequest]" |
| 22 | + |
22 | 23 |
|
23 | 24 | ### Peer B's registered methods: |
24 | | - var requiredList = ["wc_sessionPropose"] |
25 | | - var optionalList = ["wc_authBatchRequest"] |
| 25 | + var registeredMethods = [{ method = "wc_sessionPropose", type = ProtocolType.Sign }, { method = "wc_authRequest", type = ProtocolType.Auth }, { method = "wc_authBatchRequest", type = ProtocolType.Auth }] |
26 | 26 |
|
27 | 27 |
|
28 | 28 | is valid? Yes |
29 | 29 |
|
30 | 30 | --- |
31 | 31 |
|
32 | | -## 3. Peer B matches the required list and does not paritially match the optional list |
| 32 | +## 3. Peer B contains more methods than URI's list of methods |
33 | 33 |
|
34 | 34 | ### Peer A's pairing uri: |
35 | | - uri = "...req-methods="wc_sessionPropose"&opt-methods="wc_authBatchRequest,wc_pushMessage"" |
| 35 | + uri = "...methods=[wc_sessionPropose]" |
| 36 | + |
36 | 37 |
|
37 | 38 | ### Peer B's registered methods: |
38 | | - var requiredList = ["wc_sessionPropose"] |
39 | | - var optionalList = [] |
| 39 | + var registeredMethods = [{ method = "wc_sessionPropose", type = ProtocolType.Sign }, { method = "wc_authRequest", type = ProtocolType.Auth }, { method = "wc_authBatchRequest", type = ProtocolType.Auth }] |
40 | 40 |
|
41 | 41 |
|
42 | 42 | is valid? Yes |
43 | 43 |
|
44 | 44 | --- |
45 | 45 |
|
46 | | -## 4. Required list is empty and Peer B's paritially matches the optional list |
| 46 | +## 4. Peer B matches an inner array and does not partically match the other inner array |
47 | 47 |
|
48 | 48 | ### Peer A's pairing uri: |
49 | | - uri = "...opt-methods="wc_authBatchRequest,wc_pushMessage"" |
50 | | - |
51 | | -### Peer B's registered methods: |
52 | | - var requiredList = [] |
53 | | - var optionalList = ["wc_pushMessage"] |
| 49 | + uri = "...methods=[wc_sessionPropose],[wc_authRequest]" |
54 | 50 |
|
55 | 51 |
|
56 | | -is valid? Yes |
57 | | - |
58 | | ---- |
59 | | - |
60 | | -## 5. Peer B does not match the required list and matches the optional list |
61 | | - |
62 | | -### Peer A's pairing uri: |
63 | | - uri = "...req-methods="wc_sessionRequest"&opt-methods="wc_authBatchRequest,wc_pushMessage"" |
64 | | - |
65 | 52 | ### Peer B's registered methods: |
66 | | - var requiredList = ["wc_sessionPropose"] |
67 | | - var optionalList = ["wc_authBatchRequest","wc_pushMessage"] |
| 53 | + var registeredMethods = [{ method = "wc_sessionPropose", type = ProtocolType.Sign }] |
68 | 54 |
|
69 | 55 |
|
70 | 56 | is valid? No |
71 | 57 |
|
72 | 58 | --- |
73 | 59 |
|
74 | | -## 6. Peer B does not match the required list and partially matches the optional list |
| 60 | +## 5. Peer B does not match any inner arrays |
75 | 61 |
|
76 | 62 | ### Peer A's pairing uri: |
77 | | - uri = "...req-methods="wc_sessionRequest"&opt-methods="wc_authBatchRequest,wc_pushMessage"" |
78 | | - |
79 | | -### Peer B's registered methods: |
80 | | - var requiredList = ["wc_sessionPropose"] |
81 | | - var optionalList = ["wc_authBatchRequest"] |
82 | | - |
83 | | - |
84 | | -is valid? No |
85 | | - |
86 | | ---- |
| 63 | + uri = "...methods=[wc_sessionPropose],[wc_authRequest]" |
87 | 64 |
|
88 | | -## 7. Peer B does not match the required list and does not partially matches the optional list |
89 | 65 |
|
90 | | -### Peer A's pairing uri: |
91 | | - uri = "...req-methods="wc_sessionRequest"&opt-methods="wc_authBatchRequest,wc_pushMessage"" |
92 | | - |
93 | 66 | ### Peer B's registered methods: |
94 | | - var requiredList = ["wc_sessionPropose"] |
95 | | - var optionalList = [] |
| 67 | + var registeredMethods = [{ method = "wc_sessionProposeV2", type = ProtocolType.Sign },{ method = "wc_authBatchRequest", type = ProtocolType.Auth }] |
96 | 68 |
|
97 | 69 |
|
98 | 70 | is valid? No |
0 commit comments