public void TestGetSameCountAndNextKey() { AntString antStr = new AntString("110001110"); Assert.AreEqual("1", antStr.getKey()); int nextKeyPosition = antStr.getSameCount(); antStr.nextKeyPosition(nextKeyPosition); Assert.AreEqual("0", antStr.getKey()); nextKeyPosition = antStr.getSameCount(); antStr.nextKeyPosition(nextKeyPosition); Assert.AreEqual("1", antStr.getKey()); nextKeyPosition = antStr.getSameCount(); antStr.nextKeyPosition(nextKeyPosition); Assert.AreEqual("0", antStr.getKey()); }
public void TestGetSameCount() { AntString antStr = new AntString("111100"); Assert.AreEqual(4, antStr.getSameCount()); }