public void GrayIntSwitchTest() { Assert.AreEqual(1, BinaryTool.GrayToInt(BinaryTool.IntToGray(1, 3))); Assert.AreEqual(0, BinaryTool.GrayToInt(BinaryTool.IntToGray(0, 1))); Assert.AreEqual(0, BinaryTool.GrayToInt(BinaryTool.IntToGray(0, 10))); Assert.AreEqual(17, BinaryTool.GrayToInt(BinaryTool.IntToGray(17, 5))); Assert.AreEqual(255, BinaryTool.GrayToInt(BinaryTool.IntToGray(255, 8))); Assert.AreEqual(156, BinaryTool.GrayToInt(BinaryTool.IntToGray(156, 20))); }