public void NewEntry_HasSemanticDomainWeDontKnowAbout_AddedAnyways() { Extensible extensibleInfo = new Extensible(); LexEntry e = _builder.GetOrMakeEntry(extensibleInfo, 0); LexSense s = _builder.GetOrMakeSense(e, new Extensible(), string.Empty); var t = new Trait("semantic-domain-ddp4", "9.9.9.9.9.9 Computer Gadgets" ); _builder.MergeInTrait(s, t); _builder.FinishEntry(e); var property = e.Senses[0].GetProperty<OptionRefCollection>(LexSense.WellKnownProperties.SemanticDomainDdp4); Assert.AreEqual("9.9.9.9.9.9 Computer Gadgets", property.KeyAtIndex(0)); }
public void NewEntry_HasSemanticDomainWithTextualLabel_CorrectlyAddsSemanticDomain() { Extensible extensibleInfo = new Extensible(); LexEntry e = _builder.GetOrMakeEntry(extensibleInfo, 0); LexSense s = _builder.GetOrMakeSense(e, new Extensible(), string.Empty); var t = new Trait("semantic-domain-ddp4", //the name has migrated up to this already "4.2.7"); _builder.MergeInTrait(s, t); _builder.FinishEntry(e); var property = e.Senses[0].GetProperty<OptionRefCollection>(LexSense.WellKnownProperties.SemanticDomainDdp4); Assert.AreEqual("4.2.7 Play, fun", property.KeyAtIndex(0)); }