Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/msg builders #972

Merged
merged 31 commits into from
Sep 13, 2023
Merged
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
99b41de
Added builders for decorators and ack messages
bobozaur Sep 5, 2023
96577c0
Added remaining message builders
bobozaur Sep 6, 2023
ca08b33
Modified Connection Invitation to use uniform decorators
bobozaur Sep 6, 2023
f01142d
Added MsgPartsBuilder
bobozaur Sep 6, 2023
c62c51a
Used builders within aries-vcx
bobozaur Sep 7, 2023
62917e1
Replaced constructor methods with builders in aries-vcx and libvcx-core
bobozaur Sep 8, 2023
938831d
Fixed napi-rs msg building
bobozaur Sep 8, 2023
39f71a2
Formatting fix
bobozaur Sep 8, 2023
84a1c00
Messages tests fixes
bobozaur Sep 8, 2023
bfe1e97
Used did_parser::Did in PwDidInvitation
bobozaur Sep 8, 2023
2421c0e
Fixed InvitationContent serde impl
bobozaur Sep 11, 2023
692f264
Removed some awkward inner structs builders
bobozaur Sep 12, 2023
be0366f
Adjusted attachment decorator tests
bobozaur Sep 12, 2023
d12cd25
Adjusted localization decorators tests
bobozaur Sep 12, 2023
144f996
Adjusted thread decorator tests
bobozaur Sep 12, 2023
4f735fb
Adjusted timing decorator tests
bobozaur Sep 12, 2023
07d0405
Adjusted connection protocol messages tests
bobozaur Sep 12, 2023
ae763b2
Adjusted credential issuance protocol messages tests
bobozaur Sep 12, 2023
33fdefe
Adjusted discover features protocol messages tests
bobozaur Sep 12, 2023
092d44f
Adjusted notification protocol messages tests
bobozaur Sep 12, 2023
513b09f
Adjusted OOB protocol messages tests
bobozaur Sep 12, 2023
f081d4a
Adjusted present proof protocol messages tests
bobozaur Sep 12, 2023
aaaa1a2
Adjusted revocation protocol messages tests
bobozaur Sep 12, 2023
06e4cc1
Adjusted trust ping protocol messages tests
bobozaur Sep 12, 2023
63ffb4f
Adjusted basic message protocol messages tests
bobozaur Sep 12, 2023
2bab9f4
Adjusted report problem protocol messages tests
bobozaur Sep 12, 2023
30228e0
Ran cargo fmt
bobozaur Sep 12, 2023
529f4f7
Post rebase fixes
bobozaur Sep 12, 2023
b3ddc87
Fix msg_type regressions
bobozaur Sep 12, 2023
5b1637c
Fix credential thread building
bobozaur Sep 12, 2023
66eaf07
Added extraction of thread_id from Thread
bobozaur Sep 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Messages tests fixes
Signed-off-by: Bogdan Mircea <mirceapetrebogdan@gmail.com>
bobozaur committed Sep 12, 2023
commit 84a1c00c42a1743f38877ffaf9de20a228e60175
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ mod tests {
let recipient_keys = vec!["test_recipient_key".to_owned()];
let service_endpoint = Url::parse("https://dummy.dummy/dummy").unwrap();

let content = PairwiseInvitationContent::builder()
let content = InvitationContent::builder_pairwise()
.label(label.to_owned())
.recipient_keys(recipient_keys.clone())
.service_endpoint(service_endpoint.clone())
@@ -75,7 +75,7 @@ mod tests {
let routing_keys = vec!["test_routing_key".to_owned()];
let service_endpoint = Url::parse("https://dummy.dummy/dummy").unwrap();

let content = PairwiseInvitationContent::builder()
let content = InvitationContent::builder_pairwise()
.label(label.to_owned())
.recipient_keys(recipient_keys.clone())
.routing_keys(routing_keys.clone())
@@ -99,9 +99,9 @@ mod tests {
fn test_minimal_conn_invite_pw_did() {
let label = "test_pw_invite_label";
let recipient_keys = vec!["test_recipient_key".to_owned()];
let service_endpoint = "https://dummy.dummy/dummy";
let service_endpoint = "did:sov:123456789abcdefghi1234";

let content = PairwiseDidInvitationContent::builder()
let content = InvitationContent::builder_pairwise_did()
.label(label.to_owned())
.recipient_keys(recipient_keys.clone())
.service_endpoint(service_endpoint.to_owned())
@@ -124,9 +124,9 @@ mod tests {
let label = "test_pw_invite_label";
let recipient_keys = vec!["test_recipient_key".to_owned()];
let routing_keys = vec!["test_routing_key".to_owned()];
let service_endpoint = "https://dummy.dummy/dummy";
let service_endpoint = "did:sov:123456789abcdefghi1234";

let content = PairwiseDidInvitationContent::builder()
let content = InvitationContent::builder_pairwise_did()
.label(label.to_owned())
.recipient_keys(recipient_keys.clone())
.routing_keys(routing_keys.clone())
Original file line number Diff line number Diff line change
@@ -27,7 +27,7 @@ mod tests {
let label = "test_label";
let did = "test_did";

let content = PublicInvitationContent::builder()
let content = InvitationContent::builder_public()
.label(label.to_owned())
.did(did.to_owned())
.build();
@@ -47,19 +47,19 @@ mod tests {
let label = "test_label";
let did = "test_did";

let content = PublicInvitationContent::builder()
let content = InvitationContent::builder_public()
.label(label.to_owned())
.did(did.to_owned())
.build();

let decorators = InvitationDecorators::builder().timing(make_extended_timing()).build();

let expected = json!({
"label": label,
"did": did
"did": did,
"~timing": decorators.timing
});

let mut decorators = InvitationDecorators::default();
decorators.timing = Some(make_extended_timing());

test_utils::test_msg(content, decorators, ConnectionTypeV1_0::Invitation, expected);
}
}