public Concept(EndemeReference enRef) { enRef.Add(Relationship); Friend = new EndemeList("Friend", enRef, 0.95); Observer = new EndemeList("Standard", Relationship); }
// ---------------------------------------------------------------------------------------- /// <!-- EndemeValue_test --> /// <summary> /// /// </summary> private void EndemeValueAddStrValue_test() { Assert.ThingsAbout("EndemeList", "Add"); EndemeReference enRef = new EndemeReference(); enRef.Add(new EndemeSet("Identity")); enRef["Identity"].Add('A', "Alias", ""); enRef["Identity"].Add('B', "Birthday", ""); enRef["Identity"].Add('C', "Card number", ""); enRef["Identity"].Add('D', "DL number", "driver's license"); enRef["Identity"].Add('E', "Email", ""); enRef["Identity"].Add('F', "First name", ""); enRef["Identity"].Add('G', "Gender", ""); enRef["Identity"].Add('H', "Honorific", "prefix (Mr, Dr...)"); enRef["Identity"].Add('I', "Id", ""); enRef["Identity"].Add('J', "Judicial number", ""); enRef["Identity"].Add('K', "King", "father's X"); enRef["Identity"].Add('L', "Last name", ""); enRef["Identity"].Add('M', "Middle name", ""); enRef["Identity"].Add('N', "Nick name", ""); enRef["Identity"].Add('O', "Oceanic number", ""); enRef["Identity"].Add('P', "Postfix", "suffix"); enRef["Identity"].Add('Q', "Queen", "mother's X"); enRef["Identity"].Add('R', "Race", ""); enRef["Identity"].Add('S', "Social number", ""); enRef["Identity"].Add('T', "Tag, userid", ""); enRef["Identity"].Add('U', "Unmarried name", "maiden name"); enRef["Identity"].Add('V', "Visa number", "passport number"); enRef.Add(new EndemeSet("Demographic")); enRef["Demographic"].Add('A', "Age", "Stage of life"); enRef["Demographic"].Add('B', "Body Shape", "Robustness/Weight/Physique/Girth"); enRef["Demographic"].Add('C', "Country", "Continent/Region"); enRef["Demographic"].Add('D', "Damage", "Natural Damage"); enRef["Demographic"].Add('E', "Experience", ""); enRef["Demographic"].Add('F', "Flying", "Air Speed"); enRef["Demographic"].Add('G', "Gender", "Sex"); enRef["Demographic"].Add('H', "Hit Points", ""); enRef["Demographic"].Add('I', "Insanity", "madness/Sanity"); enRef["Demographic"].Add('J', "Jesus", "Gift/Grace/Faith/Religion"); enRef["Demographic"].Add('K', "Kingdom", "Ethnicity/Nation/State/People"); enRef["Demographic"].Add('L', "Level", ""); enRef["Demographic"].Add('M', "Movement", "Speed/Ground/Land"); enRef["Demographic"].Add('N', "Nature", "Personality/Temperment"); enRef["Demographic"].Add('O', "Organization", "School/Business/Guild"); enRef["Demographic"].Add('P', "Position", "Social Status/class"); enRef["Demographic"].Add('Q', "Quester", "Player"); enRef["Demographic"].Add('R', "Race", "Species"); enRef["Demographic"].Add('S', "Swimming", "Sailing"); enRef["Demographic"].Add('T', "Tallness", "Height/Size/Length"); enRef["Demographic"].Add('U', "Underwater move", ""); enRef["Demographic"].Add('V', "", ""); EndemeList field = new EndemeList("test", enRef, 0.73); field.Add("HeroName", "Identity", "A", ""); field.Add("Species", "Demographic", "R", ""); field.Add("Gender", "Demographic", "G", ""); field.Add("First Name", "Identity", "F", ""); field.Add("Last Name", "Identity", "L", ""); field.Add("Full Name", "Identity", "LF", ""); //field.SetFieldExactly("Identity:F" , "Jon" ); // field.SetField(field.EnRef[EndemeField.Part(0,"Identity:F" )], EndemeField.Part(1,"Identity:F" ), "Jon" ); // field["Identity:F"] = "Jon" ; //field.SetFieldExactly("Identity:L" , "Grover" ); // field.SetField(field.EnRef[EndemeField.Part(0,"Identity:L" )], EndemeField.Part(1,"Identity:L" ), "Grover" ); // field["Identity:L"] = "Grover" ; //field.SetFieldExactly("Identity:LF", "Jon Grover"); // field.SetField(field.EnRef[EndemeField.Part(0,"Identity:LF")], EndemeField.Part(1,"Identity:LF"), "Jon Grover"); // field["Identity:LF"] = "Jon Grover"; EndemeValue elFirst = field.GetField("Identity:F").Item; // field["Identity:F" ]; EndemeValue elLast = field.GetField("Identity:L").Item; // field["Identity:L" ]; EndemeValue elFull = field.GetField("Identity:LF").Item; // field["Identity:LF"]; string first = TreatAs.StrValue(field.GetField("Identity:F"), ""); string last = TreatAs.StrValue(field.GetField("Identity:L"), ""); string full = TreatAs.StrValue(field.GetField("Identity:LF"), ""); //string first = field.StrValue("Identity:F" , ""); //string last = field.StrValue("Identity:L" , ""); //string full = field.StrValue("Identity:LF", ""); Assert.That(first, Is.equal_to, "Jon"); Assert.That(last, Is.equal_to, "Grover"); Assert.That(full, Is.equal_to, "Jon Grover"); _result += Assert.Conclusion; }
// ---------------------------------------------------------------------------------------- // Constructors // ---------------------------------------------------------------------------------------- public Concept() { Friend = new EndemeList("Friend", null); Observer = new EndemeList("Standard", Relationship); }