Exemplo n.º 1
0
        public void CanLoadSpecials()
        {
            var repo = new SpecialRepository();

            var specials = repo.GetAll();

            Assert.AreEqual(2, specials.Count());
            Assert.AreEqual(1, specials[0].SpecialId);
            Assert.AreEqual(2, specials[1].SpecialId);
            Assert.AreEqual("A Great Special", specials[0].SpecialTitle);
            Assert.AreEqual("A pretty good special", specials[1].SpecialTitle);
            Assert.AreEqual("this special is really great", specials[0].SpecialDetails);
            Assert.AreEqual("this special is pretty good", specials[1].SpecialDetails);
        }
Exemplo n.º 2
0
        public void CanInsertSpecial()
        {
            var repo = new SpecialRepository();

            Special test = new Special()
            {
                SpecialTitle   = "Testing!",
                SpecialDetails = "test test",
            };

            repo.Insert(test);


            var specials = repo.GetAll();


            Assert.AreEqual(3, specials.Count());
            Assert.AreEqual(3, specials[2].SpecialId);
            Assert.AreEqual("Testing!", specials[2].SpecialTitle);
            Assert.AreEqual("test test", specials[2].SpecialDetails);
        }