Пример #1
0
        public void LoadTextAsyncTest()
        {
            var            text     = string.Join("\n", lines);
            IRawTextSource target   = new RawTextFragment(text, "test fragment");
            var            expected = text;
            string         actual;

            actual = target.LoadTextAsync().Result;
            Check.That(actual).IsEqualTo(expected);
        }
Пример #2
0
        public void LoadTextAsyncTest()
        {
            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);
            var expected = string.Join("\n", text);
            var actual   = target.LoadTextAsync().Result;

            Check.That(actual).IsEqualTo(expected);
        }