Esempio n. 1
0
        public void CanLoadModels()
        {
            var repo   = new ModelRepositoryADO();
            var models = repo.GetModels();

            Assert.AreEqual(10, models.Count());
            Assert.AreEqual(1, models[2].MakeID);
            Assert.AreEqual("Model X", models[8].ModelName);
        }
Esempio n. 2
0
        public void CanGetModelList()
        {
            var repo   = new ModelRepositoryADO();
            var models = repo.GetModels().ToList();

            Assert.AreEqual(5, models.Count());
            Assert.AreEqual(1, models[0].MakeID);
            Assert.AreEqual(3, models[2].ModelID);
            Assert.AreEqual("Pontiac", models[3].MakeName);
            Assert.AreEqual("F150", models[2].ModelName);
            Assert.AreEqual("1999-11-05", models[1].ModelDateAdded.ToString("yyyy-MM-dd"));
            Assert.AreEqual("*****@*****.**", models[2].Email);
            Assert.AreEqual("00000000-1111-1111-0000-000000000000", models[4].UserID);
        }