protected override void setRandomValues(RequestTransaction o)
 {
     o.Data.Amount      = GetRandom.Decimal();
     o.Data.Explanation = GetRandom.String();
     o.Data.Status      = GetRandom.Enum <TransactionStatus>();
     base.setRandomValues(o);
 }
예제 #2
0
        public static Rounding Random()
        {
            var s        = GetRandom.Enum <Approximate>();
            var decimals = GetRandom.Int8(-10, 10);
            var rd       = GetRandom.UInt8(0, 9);
            var rs       = 0.05 * GetRandom.UInt8(0, 10);

            return(new Rounding(s, decimals, rd, rs));
        }
예제 #3
0
        public void TestEnumProperty <T>(Func <T> get, Action <T> set)
        {
            Assert.IsTrue(typeof(T).IsEnum);
            var i = GetEnum.Value <T>(0);

            Assert.AreEqual(i, get());
            var s = GetRandom.Enum <T>();

            set(s);
            Assert.AreEqual(s, get());
        }
예제 #4
0
        [TestMethod] public void OperationTest()
        {
            Operation op;

            do
            {
                op = GetRandom.Enum <Operation>();
            } while (op == Operation.Dummy);
            obj.Operation = op;
            Assert.AreEqual(obj.Name, op.ToString());
            Assert.AreEqual(obj.Operation, op);
        }
예제 #5
0
        public void EnumTest()
        {
            var e = GetRandom.Enum <EventType>();

            Assert.IsInstanceOfType(e, typeof(EventType));
            while (true)
            {
                if (GetRandom.Enum <EventType>() != e)
                {
                    return;
                }
            }
        }
예제 #6
0
        [TestMethod] public void EnumTest()
        {
            var e = GetRandom.Enum <IsoGender>();

            Assert.IsInstanceOfType(e, typeof(IsoGender));
            while (true)
            {
                if (GetRandom.Enum <IsoGender>() != e)
                {
                    return;
                }
            }
        }
        private void initializeTestData()
        {
            var min = DateTime.Now.AddYears(-50);
            var max = DateTime.Now.AddYears(50);

            id                = GetRandom.String();
            amount            = GetRandom.Decimal();
            explanation       = GetRandom.String();
            senderAccountId   = GetRandom.String();
            receiverAccountId = GetRandom.String();
            status            = GetRandom.Enum <TransactionStatus>();
            validFrom         = GetRandom.DateTime(min, max);
            validTo           = GetRandom.DateTime(validFrom, max);
        }
예제 #8
0
        protected void testEnumProperty <T>(Func <T> get, Action <T> set)
        {
            Assert.IsTrue(typeof(T).IsEnum);
            var x = get();
            var s = GetRandom.Enum <T>();

            while (x.Equals(s))
            {
                s = GetRandom.Enum <T>();
            }
            Assert.AreNotEqual(s, get());
            set(s);
            Assert.AreEqual(s, get());
        }
예제 #9
0
 protected override void SetRandomValues()
 {
     base.SetRandomValues();
     operation = GetRandom.Enum <Operation>();
 }