コード例 #1
0
        public void Can_remove_a_user_from_a_role()
        {
            var role = new Role("Test Role");
            var user = new User(userName, password, email, passwordQuestion, passwordAnswer);

            user.AddToRole(role);

            Assert.True(user.Roles.Contains(role));

            user.RemoveFromRole(role);

            Assert.False(user.Roles.Contains(role));
        }