Пример #1
0
 public void GetByErroneousIdKeyFeaturey()
 {
     using (var db = new EntitesContext())
     {
         keyFeatureL = Get(db);
         Assert.ThrowsException <ArgumentException>(() => keyFeatureL.GetById(erroneousId));
     }
 }
Пример #2
0
        public void GetByIdNoDBKeyFeature()
        {
            KeyFeature getById;

            using (var db = new EntitesContext())
            {
                ClearTable.KeyFeatures(db);
                keyFeatureL = Get(db);
                getById     = keyFeatureL.GetById(1);
            }

            Assert.IsNull(getById);
        }
Пример #3
0
        public void GetByIdKeyFeature()
        {
            KeyFeature getById;
            KeyFeature kfExpected = CreateNew(1);

            using (var db = new EntitesContext())
            {
                ClearTable.KeyFeatures(db);
                keyFeatureL = Get(db);
                keyFeatureL.Save(CreateNew());
                getById = keyFeatureL.GetById(1);
            }

            Assert.AreEqual(getById, kfExpected);
        }