public void LinesAreAddedToModelOnLearn() { var model = new StringMarkov(); model.Learn(ExampleData); Assert.AreEqual(ExampleData.Count(), model.SourcePhrases.Count); CollectionAssert.AreEquivalent(ExampleData.ToList(), model.SourcePhrases); }
public void LearningDuplicateLinesAreIgnored() { var model = new StringMarkov(); model.Learn(ExampleData); model.Learn(ExampleData); Assert.AreEqual(ExampleData.Count(), model.SourcePhrases.Count); Assert.That(ExampleData.ToList(), Is.EquivalentTo(model.SourcePhrases)); Assert.That(model.SourcePhrases, Is.Unique); }