mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-16 19:48:27 +00:00
Added the choice of simulated participants to the test situation of the BeyondFacts Lab
This commit is contained in:
13 files changed
+557
-5
No files matched your search
@@ -213,6 +213,46 @@ public sealed class BflStalenessTests
|
||||
Assert.That(BflStaleness.FingerprintOf(first), Is.EqualTo(BflStaleness.FingerprintOf(second)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void WithGenericCounterpartsTheFingerprintStaysAsItWasBeforeTheSimulation()
|
||||
{
|
||||
var withoutSimulation = new BflStepFormData();
|
||||
withoutSimulation.Set(BflFieldCatalog.TEST_NOTES, "Text");
|
||||
var generic = new BflStepFormData { Simulation = new() { Mode = BflSimulationMode.GENERIC, People = ["Eva Klein"] } };
|
||||
generic.Set(BflFieldCatalog.TEST_NOTES, "Text");
|
||||
|
||||
// How the lab computed the fingerprint of this form before it simulated people:
|
||||
var before = Convert.ToHexStringLower(SHA256.HashData(Encoding.UTF8.GetBytes($"{BflFieldCatalog.TEST_NOTES}\0Text\0")));
|
||||
|
||||
using (Assert.EnterMultipleScope())
|
||||
{
|
||||
Assert.That(BflStaleness.FingerprintOf(withoutSimulation), Is.EqualTo(before));
|
||||
Assert.That(BflStaleness.FingerprintOf(generic), Is.EqualTo(before));
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheFingerprintCountsTheModeAndThePeopleOfTheSimulation()
|
||||
{
|
||||
var empty = new BflStepFormData();
|
||||
var single = new BflStepFormData { Simulation = new() { Mode = BflSimulationMode.SINGLE_PERSON, People = ["Eva Klein"] } };
|
||||
var panel = new BflStepFormData { Simulation = new() { Mode = BflSimulationMode.PANEL_DISCUSSION, People = ["Eva Klein"] } };
|
||||
var otherPerson = new BflStepFormData { Simulation = new() { Mode = BflSimulationMode.SINGLE_PERSON, People = ["Frank Ott"] } };
|
||||
|
||||
var fingerprints = new[] { empty, single, panel, otherPerson }.Select(BflStaleness.FingerprintOf).ToList();
|
||||
|
||||
Assert.That(fingerprints, Is.Unique);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TheOrderAndTheSpellingOfTheSimulatedPeopleIsNoChange()
|
||||
{
|
||||
var first = new BflStepFormData { Simulation = new() { Mode = BflSimulationMode.PANEL_DISCUSSION, People = ["Eva Klein", "Frank Ott"] } };
|
||||
var second = new BflStepFormData { Simulation = new() { Mode = BflSimulationMode.PANEL_DISCUSSION, People = ["frank ott", "Eva Klein"] } };
|
||||
|
||||
Assert.That(BflStaleness.FingerprintOf(first), Is.EqualTo(BflStaleness.FingerprintOf(second)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AChangedCardSortWeighsLikeChangedDetails()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user