()
| 1087 | |
| 1088 | #[test] |
| 1089 | fn test_outcome_with_conflicts() { |
| 1090 | use super::super::conflict::{ConflictKind, CrdtConflict}; |
| 1091 | |
| 1092 | let options = ApplyOptions::builder().fail_on_conflict(false).build(); |
| 1093 | let mut context = ApplyContext::new(options); |
| 1094 | |
| 1095 | let conflict = CrdtConflict::new(ConflictKind::ConcurrentInsert, "test".to_string()); |
| 1096 | context.add_conflict(conflict); |
| 1097 | |
| 1098 | let outcome = context.finish(); |
| 1099 | |
| 1100 | assert!(outcome.is_success()); // success because fail_on_conflict is false |
| 1101 | assert!(outcome.has_conflicts()); |
| 1102 | assert_eq!(outcome.conflict_count(), 1); |
| 1103 | } |
| 1104 | |
| 1105 | #[test] |
| 1106 | fn test_outcome_into_stats() { |
nothing calls this directly
no test coverage detected