Exemplo n.º 1
0
        public void LoggingSubjectNameAndGenderTest()
        {
            var    log = new StringLog();
            Random rng = new Random();

            var subject0 = new PointElement("Susan");

            subject0.Data.Add(new ElementGender(Base.Gender.Feminine));
            var subject1 = new PointElement("Bob");

            subject1.Data.Add(new ElementGender(Base.Gender.Masculine));
            log.WriteMarkup("{SUBJECT[0|Name]} is {GENDER[0|genderless|male|female]}.  {SUBJECT[1|Name]} is {GENDER[1|genderless|male|female]}.", rng, subject0, subject1);

            Assert.AreEqual("Susan is female.  Bob is male.", log.ToString());
        }
Exemplo n.º 2
0
        public static void LogScriptTest()
        {
            var    log = new StringLog();
            Random rng = new Random();

            log.WriteMarkup("This is a <B>Test</B>, which could read {RANDOM[option one|option two|flibble]}!", rng);

            var subject0 = new PointElement("Susan");

            subject0.Data.Add(new ElementGender(Base.Gender.Feminine));
            var subject1 = new PointElement("Bob");

            subject1.Data.Add(new ElementGender(Base.Gender.Masculine));
            log.WriteLine();
            log.WriteMarkup("{SUBJECT[0|Name]} is {GENDER[0|genderless|male|female]}. {SUBJECT[1|Name]} is {GENDER[1|genderless|male|female]}.", rng, subject0, subject1);
            Core.Print(log.ToString());
        }