コード例 #1
0
    public void TestGetLongestSubsequenceSequenceInMiddle()
    {
        List <int> numbers = new List <int>()
        {
            1, 1, 1, 2, 3, -6, -6, -6, -6, 9, 9
        };
        List <int> resultList = ListMethods.GetLongestSubsequence(numbers);

        List <int> expectedResult = new List <int>()
        {
            -6, -6, -6, -6
        };

        for (int i = 0; i < resultList.Count; i++)
        {
            Assert.AreEqual(resultList[i], expectedResult[i]);
        }
    }
コード例 #2
0
 public void TestGetLongestSubsequenceEmpty()
 {
     List <int> numbers    = new List <int>();
     List <int> resultList = ListMethods.GetLongestSubsequence(numbers);
 }
コード例 #3
0
 public void TestGetLongestSubsequenceNull()
 {
     List <int> resultList = ListMethods.GetLongestSubsequence(null);
 }