public static void FindRotationPointIndex_HandlesSmallEven() { Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] { "xenoepist", "asymptote", // <-- rotates here! }), Is.EqualTo(1)); }
public static void FindRotationPointIndex_HandlesRotationPointAtBeginning() { Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] { "asymptote", // <-- rotates here! "babka", "banoffee", "engender", "karpatka", "othellolagkage", }), Is.EqualTo(0)); }
public static void FindRotationPointIndex_HandlesRotationPointAtEnd() { Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] { "ptolemaic", "retrograde", "supplant", "undulate", "xenoepist", "asymptote", // <-- rotates here! }), Is.EqualTo(5)); }
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)); }
public static void FindRotationPointIndex_HandlesSingle() { Assert.That(RotatedDictionary.FindRotationPointIndex(new string[] { "asymptote", // <-- rotates here! }), Is.EqualTo(0)); }
public static void FindRotationPointIndex_HandlesNullArgument() { Assert.Throws <ArgumentNullException>(() => RotatedDictionary.FindRotationPointIndex(null)); }