Added the simulation of the test situation to the sessions shared from the BeyondFacts Lab

This commit is contained in:
Thorsten Sommer committed 2026-11-15 16:36:23 +01:00
1 parent c08e5d7fb0
commit c11c5640c2
4 files changed
+40 -6

No files matched your search

@@ -179,6 +179,24 @@ public sealed class BflShareModelBuilderTests
}
}
[Test]
public void TheSimulationAppearsWithItsModeAndTheNumberOfPeopleButNoNames()
{
var research = new BflPersonResearch { Name = "Eva Klein" };
research.Set(BflPersonResearchStage.POSITIONS, new BflResearch { Text = "Positionen", CreatedAtUtc = NOW });
var simulation = new BflEffectiveSimulation(BflSimulationMode.PANEL_DISCUSSION, [new BflSimulatedPerson(new() { Name = "Eva Klein" }, research)]);
var withPeople = Build(simulation: simulation);
var generic = Build();
using (Assert.EnterMultipleScope())
{
Assert.That(withPeople, Does.Contain($"- **Simulation in the test situation:** {BflSimulationMode.PANEL_DISCUSSION.Title} (1 simulated)\n"));
Assert.That(withPeople, Does.Not.Contain("Eva Klein"));
Assert.That(generic, Does.Contain($"- **Simulation in the test situation:** {BflSimulationMode.GENERIC.Title}\n"));
}
}
[Test]
public void EveryStepAppearsInItsOrder()
{
@@ -237,7 +255,7 @@ public sealed class BflShareModelBuilderTests
Assert.That(Build(forms: forms, valueDeck: deck), Does.Not.Contain("Card sort"));
}
private static string Build(Dictionary<BflStep, BflStepFormData>? forms = null, IReadOnlyDictionary<BflStep, BflWorkState>? workStates = null, IReadOnlyDictionary<BflResultKind, BflResult>? results = null, IReadOnlyDictionary<BflStep, IReadOnlyList<BflConversationMessage>>? conversations = null, IReadOnlyList<BflMaterial>? materials = null, IReadOnlyCollection<BflResearchTopic>? researchTopics = null, int researchedPeople = 0, bool includePersonalDisclosures = false, BflValueDeck? valueDeck = null) => BflShareModelBuilder.Build(new BflShareInput(
private static string Build(Dictionary<BflStep, BflStepFormData>? forms = null, IReadOnlyDictionary<BflStep, BflWorkState>? workStates = null, IReadOnlyDictionary<BflResultKind, BflResult>? results = null, IReadOnlyDictionary<BflStep, IReadOnlyList<BflConversationMessage>>? conversations = null, IReadOnlyList<BflMaterial>? materials = null, IReadOnlyCollection<BflResearchTopic>? researchTopics = null, int researchedPeople = 0, bool includePersonalDisclosures = false, BflValueDeck? valueDeck = null, BflEffectiveSimulation? simulation = null) => BflShareModelBuilder.Build(new BflShareInput(
forms ?? Forms(),
workStates ?? new Dictionary<BflStep, BflWorkState>(),
results ?? new Dictionary<BflResultKind, BflResult>(),
@@ -249,7 +267,8 @@ public sealed class BflShareModelBuilderTests
"26.11.2",
NOW,
CultureInfo.InvariantCulture,
valueDeck));
valueDeck,
simulation));
private static Dictionary<BflStep, BflStepFormData> Forms() => BflStep.All.ToDictionary(step => step, _ => new BflStepFormData());