Exemple #1
0
        public void EnableService()
        {
            Service service1 = _ts.CreateServiceInDb(false);

            using (var _db = new DatabaseContext())
            {
                Assert.AreEqual(true, service1.Disabled);
                Assert.AreEqual(1, _os.EnableService(_db, service1.Id));
                _db.SaveChanges();
                Service service = _db.Services
                                  .Where(s => s.Id == service1.Id)
                                  .FirstOrDefault();
                Assert.AreEqual(false, service.Disabled);
            }
        }