public void GetDecimalScaleMustBeBetween0And28Inclusive(int low, int mid, int high, int signed, int scale, int badScale)
        {
            TestRandom rand = new TestRandom();
            rand.IntQueue.Enqueue(low);
            rand.IntQueue.Enqueue(mid);
            rand.IntQueue.Enqueue(high);
            rand.IntQueue.Enqueue(signed);
            rand.IntQueue.Enqueue(badScale);

            Assert.AreEqual(new System.Decimal(low, mid, high, (signed % 2) == 1, (byte)scale), rand.GetDecimal(), @"
            The two decimal values should be equal.
            ");
        }
 public void GetDecimal_MinIsTruncated_Inclusive()
 {
     TestRandom rand = new TestRandom();
     foreach(var item in GetUsableDecimalBits(5m))
         rand.IntQueue.Enqueue(item);
     Assert.AreEqual(6m, rand.GetDecimal(6m, 10m));
 }
        public void GetDecimal(System.Decimal target)
        {
            TestRandom rand = new TestRandom();
            foreach(var item in GetUsableDecimalBits(target))
                rand.IntQueue.Enqueue(item);

            Assert.AreEqual(target, rand.GetDecimal());
        }