Add territory and player packed event import
This commit is contained in:
parent
f73234cb99
commit
ca208f74e0
26 changed files with 1912 additions and 272 deletions
|
|
@ -174,6 +174,8 @@ mod tests {
|
|||
metadata: BTreeMap::new(),
|
||||
companies: Vec::new(),
|
||||
selected_company_id: None,
|
||||
players: Vec::new(),
|
||||
selected_player_id: None,
|
||||
territories: Vec::new(),
|
||||
company_territory_track_piece_counts: Vec::new(),
|
||||
packed_event_collection: None,
|
||||
|
|
@ -339,6 +341,8 @@ mod tests {
|
|||
available_track_laying_capacity: None,
|
||||
}],
|
||||
selected_company_id: Some(42),
|
||||
players: Vec::new(),
|
||||
selected_player_id: None,
|
||||
territories: Vec::new(),
|
||||
company_territory_track_piece_counts: Vec::new(),
|
||||
packed_event_collection: None,
|
||||
|
|
|
|||
|
|
@ -64,6 +64,8 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub active_company_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub player_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub territory_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub company_territory_track_count: Option<usize>,
|
||||
|
|
@ -86,8 +88,16 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_company_role_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_player_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_player_selection_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_player_role_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_condition_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_missing_player_condition_context_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_company_condition_scope_disabled_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_player_condition_scope_count: Option<usize>,
|
||||
|
|
@ -104,6 +114,8 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub packed_event_blocked_unmapped_real_descriptor_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_territory_policy_descriptor_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_blocked_structural_only_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub event_runtime_record_count: Option<usize>,
|
||||
|
|
@ -353,6 +365,14 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.player_count {
|
||||
if actual.player_count != count {
|
||||
mismatches.push(format!(
|
||||
"player_count mismatch: expected {count}, got {}",
|
||||
actual.player_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.territory_count {
|
||||
if actual.territory_count != count {
|
||||
mismatches.push(format!(
|
||||
|
|
@ -441,6 +461,30 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_player_context_count {
|
||||
if actual.packed_event_blocked_missing_player_context_count != count {
|
||||
mismatches.push(format!(
|
||||
"packed_event_blocked_missing_player_context_count mismatch: expected {count}, got {}",
|
||||
actual.packed_event_blocked_missing_player_context_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_player_selection_context_count {
|
||||
if actual.packed_event_blocked_missing_player_selection_context_count != count {
|
||||
mismatches.push(format!(
|
||||
"packed_event_blocked_missing_player_selection_context_count mismatch: expected {count}, got {}",
|
||||
actual.packed_event_blocked_missing_player_selection_context_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_player_role_context_count {
|
||||
if actual.packed_event_blocked_missing_player_role_context_count != count {
|
||||
mismatches.push(format!(
|
||||
"packed_event_blocked_missing_player_role_context_count mismatch: expected {count}, got {}",
|
||||
actual.packed_event_blocked_missing_player_role_context_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_condition_context_count {
|
||||
if actual.packed_event_blocked_missing_condition_context_count != count {
|
||||
mismatches.push(format!(
|
||||
|
|
@ -449,6 +493,14 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_missing_player_condition_context_count {
|
||||
if actual.packed_event_blocked_missing_player_condition_context_count != count {
|
||||
mismatches.push(format!(
|
||||
"packed_event_blocked_missing_player_condition_context_count mismatch: expected {count}, got {}",
|
||||
actual.packed_event_blocked_missing_player_condition_context_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_company_condition_scope_disabled_count {
|
||||
if actual.packed_event_blocked_company_condition_scope_disabled_count != count {
|
||||
mismatches.push(format!(
|
||||
|
|
@ -513,6 +565,14 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_territory_policy_descriptor_count {
|
||||
if actual.packed_event_blocked_territory_policy_descriptor_count != count {
|
||||
mismatches.push(format!(
|
||||
"packed_event_blocked_territory_policy_descriptor_count mismatch: expected {count}, got {}",
|
||||
actual.packed_event_blocked_territory_policy_descriptor_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.packed_event_blocked_structural_only_count {
|
||||
if actual.packed_event_blocked_structural_only_count != count {
|
||||
mismatches.push(format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue