public void TestSearcherToCountThreNumbersAndValue()
 {
     List<int> numbers = new List<int>();
     numbers = new List<int> { 0, 0, 0 };
     Sequence sequence = new Sequence();
     Searcher searcher = new Searcher();
     sequence = searcher.SearchLongestSequenceOfEqualNumbers(numbers, sequence);
     Assert.AreEqual(sequence.Length, 3);
     Assert.AreEqual(sequence.EqualNumber, 0);
 }
 public void TestSearcherToCountOneNumbersAndReturnRightValue()
 {
     List<int> numbers = new List<int>();
     numbers = new List<int> { 2 };
     Sequence sequence = new Sequence();
     Searcher searcher = new Searcher();
     sequence = searcher.SearchLongestSequenceOfEqualNumbers(numbers, sequence);
     Assert.AreEqual(sequence.Length, 1);
     Assert.AreEqual(sequence.EqualNumber, 2);
 }
 public void TestSearcherToCountThreeEqualNumbersAtTheBeginingAndReturnRightValue()
 {
     List<int> numbers = new List<int>();
     numbers = new List<int> {2, 2, 2, 3, -2, -1, -1 };
     Sequence sequence = new Sequence();
     Searcher searcher = new Searcher();
     sequence = searcher.SearchLongestSequenceOfEqualNumbers(numbers, sequence);
     Assert.AreEqual(sequence.Length, 3);
     Assert.AreEqual(sequence.EqualNumber, 2);
 }
 public static void Main()
 {
     List<int> numbers = new List<int>();
     numbers = new List<int> { 2, 3, -2, -1, -1 };
     // numbers = new List<int> { 2, 3, -2, -2, -2, -1, -1 };
     // numbers = new List<int> { 2, 3, -2, -1};
     // numbers = new List<int> { 2 };
     // numbers = new List<int> { 2, 2, 2, 3, -2, -1, -1 };
     // EnterNumbers(numbers);
     Sequence sequence = new Sequence();
     Searcher searcher = new Searcher();
     sequence = searcher.SearchLongestSequenceOfEqualNumbers(numbers, sequence);
     PrintSequence(sequence.EqualNumber, sequence.Length);
 }