@@ -3732,7 +3732,7 @@ public void Subtract_Decimal_To_MinDecimal()
3732
3732
*/
3733
3733
3734
3734
[ TestMethod ]
3735
- public void Slice_Skip2 ( )
3735
+ public void SliceSkip2 ( )
3736
3736
{
3737
3737
//The Skip operator returns the elements in the list, skipping the first number elements.
3738
3738
//define "Skip2": Skip({ 1, 2, 3, 4, 5 }, 2) // { 3, 4, 5 }
@@ -3745,7 +3745,7 @@ public void Slice_Skip2()
3745
3745
}
3746
3746
3747
3747
[ TestMethod ]
3748
- public void Slice_SkipNull ( )
3748
+ public void SliceSkipNull ( )
3749
3749
{
3750
3750
//If the number of elements is null, the result is the entire list, no elements are skipped.
3751
3751
//define "SkipNull": Skip({ 1, 3, 5 }, null) // { 1, 3, 5 }
@@ -3758,7 +3758,7 @@ public void Slice_SkipNull()
3758
3758
}
3759
3759
3760
3760
[ TestMethod ]
3761
- public void Slice_SkipEmpty ( )
3761
+ public void SliceSkipEmpty ( )
3762
3762
{
3763
3763
//If the number of elements is less than zero, the result is an empty list.
3764
3764
//define "SkipEmpty": Skip({ 1, 3, 5 }, -1) // { }
@@ -3771,7 +3771,7 @@ public void Slice_SkipEmpty()
3771
3771
}
3772
3772
3773
3773
[ TestMethod ]
3774
- public void Slice_SkipIsNull ( )
3774
+ public void SliceSkipIsNull ( )
3775
3775
{
3776
3776
//If the source list is null, the result is null.
3777
3777
//define "SkipIsNull": Skip(null, 2)
@@ -3782,9 +3782,20 @@ public void Slice_SkipIsNull()
3782
3782
Assert . IsNull ( slicedList ) ;
3783
3783
Assert . AreEqual ( expectedList , slicedList ) ;
3784
3784
}
3785
-
3785
+
3786
+ [ TestMethod ]
3787
+ public void SliceSkipZero ( )
3788
+ {
3789
+ var rtx = GetNewContext ( ) ;
3790
+ var inputList = new List < int > { 1 , 2 , 3 , 4 , 5 } ;
3791
+ var expectedList = new List < int > { 1 , 2 , 3 , 4 , 5 } ;
3792
+ var slicedList = rtx . Operators . Slice ( inputList , 0 , null ) ;
3793
+ Assert . IsNotNull ( slicedList ) ;
3794
+ CollectionAssert . AreEqual ( expectedList , slicedList . ToList ( ) ) ;
3795
+ }
3796
+
3786
3797
[ TestMethod ]
3787
- public void Slice_Tail234 ( )
3798
+ public void SliceTail234 ( )
3788
3799
{
3789
3800
//The Tail operator returns all but the first element from the given list.
3790
3801
//define "Tail234": Tail({ 1, 2, 3, 4 }) // { 2, 3, 4 }
@@ -3797,7 +3808,7 @@ public void Slice_Tail234()
3797
3808
}
3798
3809
3799
3810
[ TestMethod ]
3800
- public void Slice_TailEmpty ( )
3811
+ public void SliceTailEmpty ( )
3801
3812
{
3802
3813
//If the list is empty, the result is empty.
3803
3814
//define "TailEmpty": Tail({ }) // { }
@@ -3810,7 +3821,7 @@ public void Slice_TailEmpty()
3810
3821
}
3811
3822
3812
3823
[ TestMethod ]
3813
- public void Slice_TailIsNull ( )
3824
+ public void SliceTailIsNull ( )
3814
3825
{
3815
3826
//If the source list is null, the result is null.
3816
3827
//define "TailIsNull": Tail(null)
@@ -3823,7 +3834,7 @@ public void Slice_TailIsNull()
3823
3834
}
3824
3835
3825
3836
[ TestMethod ]
3826
- public void Slice_Take2 ( )
3837
+ public void SliceTake2 ( )
3827
3838
{
3828
3839
//The Take operator returns the first number elements from the given list.
3829
3840
//define "Take2": Take({ 1, 2, 3, 4 }, 2) // { 1, 2 }
@@ -3836,7 +3847,7 @@ public void Slice_Take2()
3836
3847
}
3837
3848
3838
3849
[ TestMethod ]
3839
- public void Slice_TakeTooMany ( )
3850
+ public void SliceTakeTooMany ( )
3840
3851
{
3841
3852
//If the list has less than number elements, the result only contains the elements in the list.
3842
3853
//define "TakeTooMany": Take({ 1, 2 }, 3) // { 1, 2 }
@@ -3849,7 +3860,7 @@ public void Slice_TakeTooMany()
3849
3860
}
3850
3861
3851
3862
[ TestMethod ]
3852
- public void Slice_TakeEmpty ( )
3863
+ public void SliceTakeEmpty ( )
3853
3864
{
3854
3865
//If number is null, or 0 or less, the result is an empty list.
3855
3866
//define "TakeEmpty": Take({ 1, 2, 3, 4 }, null) // { }
@@ -3862,7 +3873,7 @@ public void Slice_TakeEmpty()
3862
3873
}
3863
3874
3864
3875
[ TestMethod ]
3865
- public void Slice_TakeIsNull ( )
3876
+ public void SliceTakeIsNull ( )
3866
3877
{
3867
3878
//If the source list is null, the result is null.
3868
3879
//define "TakeIsNull": Take(null, 2)
0 commit comments