Ejemplo n.º 1
0
        public void LearningDuplicateLinesAreIgnored()
        {
            var model = new StringMarkov();

            model.Learn(ExampleData);
            model.Learn(ExampleData);

            var e1 = ExampleData.Except(model.SourceLines).ToList();

            Assert.AreEqual(ExampleData.Count(), model.SourceLines.Count);
            Assert.That(ExampleData.ToList(), Is.EquivalentTo(model.SourceLines));
            Assert.That(model.SourceLines, Is.Unique);
        }