/// <summary>
 /// copy constructor
 /// </summary>
 /// <param name="someMarkovAlgorithmForString">variable of type MarkovAlgorithmForString</param>
 public MarkovAlgorithmForString(MarkovAlgorithmForString someMarkovAlgorithmForString)
 {
     for (int i = 0; i < someMarkovAlgorithmForString.substitutions.Count; i++)
     {
         this.substitutions.Add(someMarkovAlgorithmForString.substitutions[i]);
     }
     this.line = someMarkovAlgorithmForString.line;
 }
Exemplo n.º 2
0
 public void TestMethodDoingAlgorithmForString50()
 {
     MarkovAlgorithmForString m = new MarkovAlgorithmForString();
     m.ReadData("in50.txt");
     string ms = m.DoingAlgorithm();
     string msForCheck = string.Empty;
     for (int i = 0; i < 2500; i++) msForCheck += "1";
     Assert.IsTrue(ms == msForCheck);
 }