public void ExecuteTest() { MarkovAlgorithm algorithm = new MarkovAlgorithm(); algorithm.AddProduction("ab", "b"); algorithm.AddProduction("ac", "c"); algorithm.AddProduction("aa", "a"); String returnedValue = algorithm.Execute("bacaabaa"); String mustBe = "bcba"; Assert.AreEqual(returnedValue, mustBe); }
public void LoopExceptionTest() { MarkovAlgorithm al = new MarkovAlgorithm(); al.AddProduction("a", "aa"); al.Execute("a"); }
public void AddProductionTest() { MarkovAlgorithm algorithm = new MarkovAlgorithm(); algorithm.AddProduction("ab", "b"); Assert.AreEqual(algorithm.Productions.Count, 1); }
public void FinalProductionTest() { MarkovAlgorithm algorithm = new MarkovAlgorithm(); algorithm.AddProduction("ab", "b", true); String returnedValue = algorithm.Execute("abcabd"); String mustBe = "bcabd"; Assert.AreEqual(returnedValue, mustBe); }
public void LoopExceptionTest() { MarkovAlgorithm al = new MarkovAlgorithm(); al.AddProduction("a", "aa"); al.Execute("a"); }
public void FinalProductionTest() { MarkovAlgorithm algorithm = new MarkovAlgorithm(); algorithm.AddProduction("ab", "b",true); String returnedValue = algorithm.Execute("abcabd"); String mustBe = "bcabd"; Assert.AreEqual(returnedValue, mustBe); }
public void ExecuteTest() { MarkovAlgorithm algorithm = new MarkovAlgorithm(); algorithm.AddProduction("ab","b"); algorithm.AddProduction("ac","c"); algorithm.AddProduction("aa","a"); String returnedValue = algorithm.Execute("bacaabaa"); String mustBe = "bcba"; Assert.AreEqual(returnedValue,mustBe); }
public void AddProductionTest() { MarkovAlgorithm algorithm = new MarkovAlgorithm(); algorithm.AddProduction("ab","b"); Assert.AreEqual(algorithm.Productions.Count,1); }