コード例 #1
0
        public void VerifyCurrency()
        {
            ICurrency currency = BusinessObjectInitializer.CreateCurrency();

            Random random = new Random();

            currency.Name = DATestUtils.GenerateString(30, true, false);
            //There are already currencies with id's from 1 to 12 in the database from the initialization script
            currency.Id = random.Next(1, 12);

            DataTable resultTable = SelectCurrencyTest(currency).Tables[0];

            //Verifies that the table contains the correct column names and order
            StringCollection columns = new StringCollection();

            columns.AddRange(new string[] { "Id",
                                            "Code",
                                            "Name" });
            DATestUtils.CheckTableStructure(resultTable, columns);
        }