/// <summary>
 /// copy constructor
 /// </summary>
 /// <param name="someMarkovAlgorithmForString">variable of type MarkovAlgorithmForMyString</param>
 public MarkovAlgorithmForMyString(MarkovAlgorithmForMyString someMarkovAlgorithmForMyString)
 {
     for (int i = 0; i < someMarkovAlgorithmForMyString.substitutions.Count; i++)
     {
         this.substitutions.Add(someMarkovAlgorithmForMyString.substitutions[i]);
     }
     this.line = new MyString(someMarkovAlgorithmForMyString.line);
 }
Пример #2
0
 public void TestMethodDoingAlgorithmForMyString50()
 {
     MarkovAlgorithmForMyString m = new MarkovAlgorithmForMyString();
     m.ReadData("in50.txt");
     MyString ms = new MyString(m.DoingAlgorithm());
     string a = string.Empty;
     for (int i = 0; i < 2500; i++) a += "1";
     MyString msForCheck = new MyString(a);
     Assert.IsTrue(ms == msForCheck);
 }