p2panda_auth/test_utils/
mod.rs1mod group_store;
4mod network;
5mod orderer;
6mod partial_ord;
7
8pub use crate::test_utils::group_store::TestGroupStore;
9pub use network::Network;
10pub use orderer::*;
11pub use partial_ord::*;
12
13use crate::group::resolver::StrongRemove;
14use crate::group::{GroupCrdt, GroupCrdtState, GroupError};
15use crate::traits::{IdentityHandle, OperationId};
16
17impl IdentityHandle for char {}
18impl OperationId for u32 {}
19
20pub type MemberId = char;
21pub type MessageId = u32;
22pub type Conditions = ();
23
24pub type GenericTestResolver<ORD, GS> = StrongRemove<MemberId, MessageId, Conditions, ORD, GS>;
25pub type GenericTestGroup<RS, ORD, GS> = GroupCrdt<MemberId, MessageId, Conditions, RS, ORD, GS>;
26pub type GenericTestGroupState<RS, ORD, GS> =
27 GroupCrdtState<MemberId, MessageId, Conditions, RS, ORD, GS>;
28
29pub type TestResolver = GenericTestResolver<TestOrderer, TestGroupStore>;
30pub type TestGroup = GenericTestGroup<TestResolver, TestOrderer, TestGroupStore>;
31pub type TestGroupState = GenericTestGroupState<TestResolver, TestOrderer, TestGroupStore>;
32pub type TestGroupError =
33 GroupError<MemberId, MessageId, Conditions, TestResolver, TestOrderer, TestGroupStore>;