public void Role_Should_Be_Updated_By_RoleModel()
        {
            var role      = RoleTestData.GetUserRole();
            var roleModel = RoleTestData.GetUpdateUserRoleModel();

            roleAdapter.Update(role, roleModel);

            Assert.AreEqual(role.Name, roleModel.Name);
            Assert.AreEqual(role.Code, roleModel.Code);
        }
Пример #2
0
        public void Role_Should_Be_Created_By_RoleModel()
        {
            var roleModel = RoleTestData.GetUpdateUserRoleModel();

            var role = roleBuilder.Build(roleModel);

            Assert.AreEqual(role.Name, roleModel.Name);
            Assert.AreEqual(role.Code, roleModel.Code);
            Assert.AreEqual(role.Id, 0);
        }
        public void Role_Update_Should_Throw_Exception_When_Role_Null()
        {
            var roleModel = RoleTestData.GetUpdateUserRoleModel();

            roleAdapter.Update(null, roleModel);
        }