Ejemplo n.º 1
0
 public static void FindRotationPointIndex_HandlesSmallEven()
 {
     Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] {
         "xenoepist",
         "asymptote",                 // <-- rotates here!
     }), Is.EqualTo(1));
 }
Ejemplo n.º 2
0
 public static void FindRotationPointIndex_HandlesRotationPointAtBeginning()
 {
     Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] {
         "asymptote",                 // <-- rotates here!
         "babka",
         "banoffee",
         "engender",
         "karpatka",
         "othellolagkage",
     }), Is.EqualTo(0));
 }
Ejemplo n.º 3
0
 public static void FindRotationPointIndex_HandlesRotationPointAtEnd()
 {
     Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] {
         "ptolemaic",
         "retrograde",
         "supplant",
         "undulate",
         "xenoepist",
         "asymptote",                 // <-- rotates here!
     }), Is.EqualTo(5));
 }
Ejemplo n.º 4
0
 public static void FindRotationPointIndex_BasicExample_ReturnsExpected()
 {
     Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] {
         "ptolemaic",
         "retrograde",
         "supplant",
         "undulate",
         "xenoepist",
         "asymptote",                 // <-- rotates here!
         "babka",
         "banoffee",
         "engender",
         "karpatka",
         "othellolagkage",
     }), Is.EqualTo(5));
 }
Ejemplo n.º 5
0
 public static void FindRotationPointIndex_HandlesSingle()
 {
     Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] {
         "asymptote",                 // <-- rotates here!
     }), Is.EqualTo(0));
 }
Ejemplo n.º 6
0
 public static void FindRotationPointIndex_HandlesNullArgument()
 {
     Assert.Throws <ArgumentNullException>(() => RotatedDictionary.FindRotationPointIndex(null));
 }