Exemplo n.º 1
0
        public void Insert_Multiple_Inserts_Bags()
        {
            ClearDatabase();
            BagDML     bagdml   = new BagDML();
            List <Bag> expected = new List <Bag>()
            {
                new Bag(0),
                new Bag(0)
            };

            bagdml.Insert_Multiple(expected);
            List <Bag> actual = getMultipleBags();

            for (int i = 0; i < actual.Count; i++)
            {
                Assert.AreEqual(expected[i], actual[i]);
            }
        }
Exemplo n.º 2
0
        public void Insert_Multiple_Runs_Without_Errors()
        {
            ClearDatabase();
            BagDML     bagdml = new BagDML();
            List <Bag> bags   = new List <Bag>()
            {
                new Bag(0),
                new Bag(0)
            };

            try
            {
                bagdml.Insert_Multiple(bags);
                // Pass test if it runs without error
                Assert.IsTrue(true);
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                Assert.Fail();
            }
        }