Exemple #1
0
        public void LoadTextTest()
        {
            var            text     = string.Join("\n", lines);
            IRawTextSource target   = new RawTextFragment(text, "test fragment");
            var            expected = text;
            string         actual;

            actual = target.LoadText();
            Check.That(actual).IsEqualTo(expected);
        }
Exemple #2
0
        public void RawTextFragmentConstructorTest()
        {
            IEnumerable <string> text = new []
            {
                "John enjoyed, with his usual lack of humility, consuming the object in question.",
                "Some may call him a heathen, but they are mistaken.",
                "Heathens are far less dangerous than he."
            };
            var name   = "test fragment";
            var target = new RawTextFragment(text, name);

            Check.That(target.Name).IsEqualTo(name);
            Check.That(target.LoadText()).IsEqualTo(string.Join("\n", text));
        }