예제 #1
0
        public void GetDuplicates_Returns_Duplicates_When_There_Exists_Duplicate()
        {
            const int duplicate = 1;

            foreach (var d in UtilityHelpers.GetDuplicates <int>(new List <int> {
                duplicate, 2, 3, duplicate
            }))
            {
                Assert.Equal(duplicate, d);
            }
        }
예제 #2
0
 public void GetDuplicates_Returns_Empty_When_Input_Is_Empty()
 {
     Assert.Empty(UtilityHelpers.GetDuplicates(new List <int>()));
 }
예제 #3
0
 public void GetDuplicates_Returns_Empty_When_Input_Is_Null()
 {
     Assert.Empty(UtilityHelpers.GetDuplicates <int>(null));
 }
예제 #4
0
 public void GetDuplicates_Returns_Empty_When_There_Exists_No_Duplicates()
 {
     Assert.Empty(UtilityHelpers.GetDuplicates <int>(new List <int> {
         1, 2, 3
     }));
 }