public void ExecuteTest() { MarkovAlgorithm algorithm = new MarkovAlgorithm(); algorithm.AddProduction("ab","b"); algorithm.AddProduction("ac","c"); algorithm.AddProduction("aa","a"); string returnedValue = algorithm.Execute("bacaabaa"); Assert.AreEqual(returnedValue,"bcba"); }
public void AddProductionTest() { MarkovAlgorithm algorithm = new MarkovAlgorithm(); algorithm.AddProduction("ab","b"); Assert.AreEqual(algorithm.Productions.Count,1); }