Complete phase 47 romance pack on generic orientation and affinity hooks.
Vanilla catalogs stay without crushes; a content pack ships the overlay so later mods can reuse it.
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
namespace HSchool.People.Tests;
|
||||
|
||||
public class OrientationGeneratorTests
|
||||
{
|
||||
[Fact]
|
||||
public void VanillaGenerate_DoesNotWriteOrientation()
|
||||
{
|
||||
var roster = Fixtures.Generate(Fixtures.Classrooms(2));
|
||||
Assert.All(roster.People, person => Assert.Null(person.Orientation));
|
||||
Assert.All(roster.People, person => Assert.Null(person.Bonds));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void RomanceGenerate_WritesOrientationToEveryone()
|
||||
{
|
||||
var catalog = Fixtures.RomanceCatalog();
|
||||
var roster = RosterGenerator.Generate(catalog, Fixtures.Classrooms(2), Fixtures.SchoolSeed, "Russia", Fixtures.AsOf, "RussianLanguage");
|
||||
Assert.NotEmpty(roster.People);
|
||||
Assert.All(roster.People, person =>
|
||||
{
|
||||
Assert.False(string.IsNullOrWhiteSpace(person.Orientation));
|
||||
Assert.True(catalog.Orientations.ContainsKey(person.Orientation!));
|
||||
Assert.NotNull(person.Bonds);
|
||||
});
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void SameSeed_YieldsTheSameOrientations()
|
||||
{
|
||||
var catalog = Fixtures.RomanceCatalog();
|
||||
var a = RosterGenerator.Generate(catalog, Fixtures.Classrooms(2), Fixtures.SchoolSeed, "Russia", Fixtures.AsOf, "RussianLanguage");
|
||||
var b = RosterGenerator.Generate(catalog, Fixtures.Classrooms(2), Fixtures.SchoolSeed, "Russia", Fixtures.AsOf, "RussianLanguage");
|
||||
Assert.Equal(
|
||||
a.People.Select(person => (person.Id, person.Orientation)),
|
||||
b.People.Select(person => (person.Id, person.Orientation)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user