public void AutoTest()
        {
            var types = new[]
            {
                typeof(Dinner),
                typeof(Meal),
                typeof(Chef),
                typeof(Country),
                typeof(User),
                typeof(Role),
            };

            foreach (var type in types)
            {
                Console.WriteLine("testing " + type.Name);
                dynamic o = Activator.CreateInstance(type).InjectFrom(new Fill(u));
                u.Insert(o);
                u.Save();
                Assert.IsTrue(o.Id != 0);
                Console.WriteLine(type.Name + " ok");
            }
        }
Exemple #2
0
        public void AutoTest()
        {
            var types = new[]
            {
                typeof(Promotion),
                typeof(Product),
                typeof(Branch),
                typeof(Country),
                typeof(User),
                typeof(Role),
            };

            foreach (var type in types)
            {
                Console.WriteLine("testing " + type.Name);
                dynamic o = Activator.CreateInstance(type).InjectFrom(new Fill(urepo));
                o = urepo.Insert(o);
                urepo.Save();
                Assert.IsTrue(o.Id != 0);
                Console.WriteLine(type.Name + " ok");
                Console.WriteLine();
            }
        }