public void HashResult() { for (int i = 0; i < 14; i++) { HashResult h1 = new HashResult(m_random.NextBytes(i)); try { uint h2 = h1.GetUInt(); if (i != 4) { Assert.Fail(i.ToString()); } Assert.IsTrue(Converters.ConvertBytesToUInts(h1.GetBytes())[0] == h2, i.ToString()); } catch { if (i == 4) { Assert.Fail(i.ToString()); } } try { ulong h3 = h1.GetULong(); if (i != 8) { Assert.Fail(i.ToString()); } Assert.IsTrue(Converters.ConvertBytesToULongs(h1.GetBytes())[0] == h3, i.ToString()); } catch { if (i == 8) { Assert.Fail(i.ToString()); } } } }