Implement real company-scoped event descriptors
This commit is contained in:
parent
eb6c4833af
commit
780e739daa
21 changed files with 1483 additions and 56 deletions
|
|
@ -330,6 +330,8 @@ mod tests {
|
|||
controller_kind: rrt_runtime::RuntimeCompanyControllerKind::Human,
|
||||
current_cash: 100,
|
||||
debt: 0,
|
||||
active: true,
|
||||
available_track_laying_capacity: None,
|
||||
}],
|
||||
selected_company_id: Some(42),
|
||||
packed_event_collection: None,
|
||||
|
|
|
|||
|
|
@ -62,6 +62,8 @@ pub struct ExpectedRuntimeSummary {
|
|||
#[serde(default)]
|
||||
pub company_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub active_company_count: Option<usize>,
|
||||
#[serde(default)]
|
||||
pub packed_event_collection_present: Option<bool>,
|
||||
#[serde(default)]
|
||||
pub packed_event_record_count: Option<usize>,
|
||||
|
|
@ -327,6 +329,14 @@ impl ExpectedRuntimeSummary {
|
|||
));
|
||||
}
|
||||
}
|
||||
if let Some(count) = self.active_company_count {
|
||||
if actual.active_company_count != count {
|
||||
mismatches.push(format!(
|
||||
"active_company_count mismatch: expected {count}, got {}",
|
||||
actual.active_company_count
|
||||
));
|
||||
}
|
||||
}
|
||||
if let Some(present) = self.packed_event_collection_present {
|
||||
if actual.packed_event_collection_present != present {
|
||||
mismatches.push(format!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue