public void Migrate_ModifiedSspSyllabifier_SspSyllabifierNotUpdated() { var oldSyllabifier = (SspSyllabifier) _project.VarietyProcessors[ComponentIdentifiers.Syllabifier]; SonorityClass[] oldScale = oldSyllabifier.SonorityScale.ToArray(); oldScale[0] = new SonorityClass(1, new NaturalClass("Stop", FeatureStruct.New(_project.FeatureSystem).Symbol(CogFeatureSystem.ConsonantType).Symbol("stop").Value)); var newSyllabifier = new SspSyllabifier(oldSyllabifier.CombineVowels, oldSyllabifier.CombineConsonants, oldSyllabifier.VowelsSameSonorityTautosyllabic, _segmentPool, oldScale); _project.VarietyProcessors[ComponentIdentifiers.Syllabifier] = newSyllabifier; var pm = new ProjectMigration4(); pm.Migrate(_segmentPool, _project); Assert.That(_project.VarietyProcessors[ComponentIdentifiers.Syllabifier], Is.EqualTo(newSyllabifier)); }
public void Migrate_SettingsSspSyllabifier_SspSyllabifierUpdated() { var oldSyllabifier = (SspSyllabifier) _project.VarietyProcessors[ComponentIdentifiers.Syllabifier]; SonorityClass[] oldScale = oldSyllabifier.SonorityScale.ToArray(); oldScale[7] = new SonorityClass(8, new UnnaturalClass("Glide", new[] {"j", "ɥ", "ɰ", "w"}, true, _project.Segmenter)); oldScale[15] = new SonorityClass(15, new NaturalClass("Open vowel", FeatureStruct.New(_project.FeatureSystem).Symbol(CogFeatureSystem.VowelType).Symbol("open").Symbol("syllabic+").Value)); var newSyllabifier = new SspSyllabifier(oldSyllabifier.CombineVowels, oldSyllabifier.CombineConsonants, oldSyllabifier.VowelsSameSonorityTautosyllabic, _segmentPool, oldScale); _project.VarietyProcessors[ComponentIdentifiers.Syllabifier] = newSyllabifier; var pm = new ProjectMigration4(); pm.Migrate(_segmentPool, _project); var syllabifier = (SspSyllabifier) _project.VarietyProcessors[ComponentIdentifiers.Syllabifier]; SonorityClass[] scale = syllabifier.SonorityScale.ToArray(); Assert.That(scale.Length, Is.EqualTo(17)); Assert.That(scale[0].SoundClass.Name, Is.EqualTo("Prenasal")); }