public void ConsecutiveOnesTest_BackLoad() { string binary = "001"; int result = BinaryCounter.ConsecutiveOnes(binary); Assert.AreEqual(1, result); }
public void ConsecutiveOnesTest_None() { string binary = "00"; int result = BinaryCounter.ConsecutiveOnes(binary); Assert.AreEqual(0, result); }
public void ConsecutiveOnesTest_FrontLoad() { string binary = "1100"; int result = BinaryCounter.ConsecutiveOnes(binary); Assert.AreEqual(2, result); }
public void ConsecutiveOnesTest_End() { string binary = "10111"; int result = BinaryCounter.ConsecutiveOnes(binary); Assert.AreEqual(3, result); }
public void ConsecutiveOnesTest_IntConversion10() { int result = BinaryCounter.ConsecutiveOnes(10); Assert.AreEqual(1, result); }