public void TestFromRawHandleFailsOnInvalid() { var invalidHandle = new BigNumberHandle(); Assert.That(invalidHandle.IsInvalid); Assert.Throws <ArgumentException>(() => BigNumber.FromRawHandle(invalidHandle)); }
public void TestFromRawHandle() { using (var handle = BigNumberHandle.Create()) { BigNumberHandle.SetWord(handle, 3); var number = BigNumber.FromRawHandle(handle); Assert.That(BigNumberHandle.Compare(number.Handle, handle) == 0); } }
public void TestFromRawHandleFailsWithSecure() { var secureHandle = BigNumberHandle.CreateSecure(); Assert.Throws <ArgumentException>(() => BigNumber.FromRawHandle(secureHandle)); }