コード例 #1
0
ファイル: DaoCrudTests.cs プロジェクト: dekkerb115/Bam.Net
        public void CreateTest()
        {
            Expect.IsTrue(_testDatabases.Count > 0);
            string methodName = MethodBase.GetCurrentMethod().Name;

            _testDatabases.Each(db =>
            {
                OutLineFormat("{0}.{1}: {2}", ConsoleColor.DarkYellow, this.GetType().Name, methodName, db.GetType().Name);
                TestTable test = new TestTable(db);
                test.Name      = 8.RandomLetters();
                test.Save(db);

                Expect.IsGreaterThan(test.Id.Value, 0, "Id should have been greater than 0");
                OutLineFormat("{0}", ConsoleColor.Cyan, test.PropertiesToString());
            });
        }