示例#1
0
        public void GenerateTest()
        {
            var config = GeneFactory.Load();

            var actual = GeneFactory.Generate(config.Where(c => c.Key == "slow").Single(), true);

            Assert.AreEqual(200, (int)((KeyValuePair <string, object>)actual.Value).Value);

            actual = GeneFactory.Generate(config.Where(c => c.Key == "take").Single(), false);
            decimal parsed;

            Assert.IsTrue(decimal.TryParse(((KeyValuePair <string, object>)actual.Value).Value.ToString(), out parsed));
            Assert.AreEqual(2, GeneFactory.GetPrecision(parsed));
        }
示例#2
0
        public void LoadTest()
        {
            var actual = GeneFactory.Load();

            Assert.IsNotNull(actual);
        }