Esempio n. 1
0
        public void EnsureGetPersonWorksProperly()
        {
            FavouriteColorEntityFrameworkRepository favCSVFileRepo = new FavouriteColorEntityFrameworkRepository();
            var person = favCSVFileRepo.GetPerson(2);

            Assert.IsTrue(person.Id == 2);
        }
Esempio n. 2
0
        public void EnsureGetPersonDealsWithUnknownIdProperly()
        {
            FavouriteColorEntityFrameworkRepository favCSVFileRepo = new FavouriteColorEntityFrameworkRepository();

            try
            {
                var person = favCSVFileRepo.GetPerson(334);
                Assert.IsTrue(false);
            }
            catch (PersonNotExistException)
            {
                Assert.IsTrue(true);
            }
        }