Example #1
0
        public void UpdateTest()
        {
            IUserGroupRepository target = new UserGroupRepository();

            item.Descricao = "UsuarioGrupo02";
            item.Tipo      = UserGroupType.Employee;
            target.Update(item);

            // use session to try to load the product
            using (ISession session = NHibernateHelper.OpenSession())
            {
                var fromDb = session.Get <UsuarioGrupo>(item.Id);

                Assert.IsNotNull(fromDb);
                Assert.AreNotSame(item, fromDb);
                Assert.AreEqual(item.Descricao, fromDb.Descricao);
                Assert.AreEqual(item.Tipo, fromDb.Tipo);
            }
        }
Example #2
0
 public ResponseModel Update(UserGroup userGroup)
 {
     return(_userGroupRepository.Update(userGroup));
 }