public void ToInt64Test() { var bc = new StraightBitConverter(); Assert.AreEqual(1L, bc.ToInt64(new byte[] { 1, 0, 0, 0, 0, 0, 0, 0 }, 0)); Assert.AreEqual(65536L, bc.ToInt64(new byte[] { 0, 0, 1, 0, 0, 0, 0, 0 }, 0)); Assert.AreEqual(4294967296L, bc.ToInt64(new byte[] { 0, 0, 0, 0, 1, 0, 0, 0 }, 0)); Assert.AreEqual(281474976710656L, bc.ToInt64(new byte[] { 0, 0, 0, 0, 0, 0, 1, 0 }, 0)); Assert.AreEqual(-1L, bc.ToInt64(new byte[] { 255, 255, 255, 255, 255, 255, 255, 255 }, 0)); }