protected static void CheckSequence(IndexGenerator generator, params int[] expectedSequence)
 {
     for (int i = 0; i < expectedSequence.Length; i++)
     {
         Assert.That(generator.HasNext);
         Assert.That(generator.Next(), Is.EqualTo(expectedSequence[i]));
     }
     Assert.That(generator.HasNext, Is.False);
 }
 protected static void CheckSequence(IndexGenerator generator, params int?[] expectedSequence)
 {
     int i = 0;
     while(i < expectedSequence.Length)
     {
         Assert.That(generator.HasNext);
         var nextValues = generator.Next();
         for (int j = 0; j < nextValues.Length; j++)
         {
             Assert.That(nextValues[j], Is.EqualTo(expectedSequence[i]), "value not equal at index:" + i);
             i++;
         }
     }
     Assert.That(generator.HasNext, Is.False);
 }
예제 #3
0
 internal DimensionDescription(int max, DimensionAssignment assignment, IndexGenerator indexGenerator)
 {
     Max = max;
     Assignment = assignment;
     this.indexGenerator = indexGenerator;
 }
예제 #4
0
 internal DimensionDescription(int length, DimensionAssignment assignment, IndexGenerator indexGenerator)
 {
     this.length = length;
     Assignment = assignment;
     this.indexGenerator = indexGenerator;
 }