test: use participant viewpoints for Scenario layout fixtures
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
use super::*;
|
use super::*;
|
||||||
use crate::{
|
use crate::{
|
||||||
Element, FragmentOperator, MessageKind, ProjectionKind, Relation, RelationBody, RelationKind,
|
Element, FragmentOperator, MessageKind, ProjectionKind, Relation, RelationBody, RelationKind,
|
||||||
|
ScenarioViewpoint,
|
||||||
};
|
};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
@@ -73,6 +74,12 @@ fn fixture() -> Fixture {
|
|||||||
let owner = project
|
let owner = project
|
||||||
.add_element(Kind::Scenario, Layer::Oa, "Nominal", None)
|
.add_element(Kind::Scenario, Layer::Oa, "Nominal", None)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
let Some(SharedBody::Scenario { viewpoint, .. }) =
|
||||||
|
project.elements.get_mut(&owner).unwrap().shared_mut()
|
||||||
|
else {
|
||||||
|
panic!("Scenario fixture body");
|
||||||
|
};
|
||||||
|
*viewpoint = ScenarioViewpoint::ParticipantInteraction;
|
||||||
let performer = project
|
let performer = project
|
||||||
.add_element(Kind::Entity, Layer::Oa, "Controller", None)
|
.add_element(Kind::Entity, Layer::Oa, "Controller", None)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
@@ -721,6 +728,12 @@ fn a_real_scenario_use_never_imports_its_called_message_as_a_direct_target() {
|
|||||||
.project
|
.project
|
||||||
.add_element(Kind::Scenario, Layer::Oa, "Called sequence", None)
|
.add_element(Kind::Scenario, Layer::Oa, "Called sequence", None)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
let Some(SharedBody::Scenario { viewpoint, .. }) =
|
||||||
|
f.project.elements.get_mut(&called).unwrap().shared_mut()
|
||||||
|
else {
|
||||||
|
panic!("Called Scenario fixture body");
|
||||||
|
};
|
||||||
|
*viewpoint = ScenarioViewpoint::ParticipantInteraction;
|
||||||
let called_message = f
|
let called_message = f
|
||||||
.project
|
.project
|
||||||
.add_element(Kind::Occurrence, Layer::Oa, "Called delivery", Some(called))
|
.add_element(Kind::Occurrence, Layer::Oa, "Called delivery", Some(called))
|
||||||
|
|||||||
Reference in New Issue
Block a user