GetAbilities() public method

public GetAbilities ( ) : IEnumerable
return IEnumerable
 public void TestGetAbilities()
 {
     _authorizationService = new AbilityAuthorizationService(new UserRepository(), new RoleRepository(), new AbilityRepository());
     _authorizationService.AddAbility(_ability1);
     _authorizationService.AddAbility(_ability2);
     IEnumerable<IAbility> abilitys = _authorizationService.GetAbilities();
     Assert.AreEqual(2, abilitys.Count());
     Assert.AreEqual(_ability1, abilitys.First());
     Assert.AreEqual(_ability2, abilitys.Last());
 }
        public void TestRemoveAbilityAlsoRemovesFromRoles()
        {
            _authorizationService = new AbilityAuthorizationService(new UserRepository(), new RoleRepository(), new AbilityRepository());
            _role1.Abilities.Add(_ability1);
            _role1.Abilities.Add(_ability2);
            _authorizationService.AddRole(_role1);

            IEnumerable<IAbility> abilities = _authorizationService.GetAbilities();
            Assert.AreEqual(2, abilities.Count());
            Assert.AreEqual(_ability1, abilities.First());
            Assert.AreEqual(_ability2, abilities.Last());

            _authorizationService.RemoveAbility("Ability1");
            abilities = _authorizationService.GetAbilities();
            Assert.AreEqual(1, abilities.Count());
            Assert.AreEqual(_ability2, abilities.First());

            IEnumerable<IRole> roles = _authorizationService.GetRoles();
            Assert.AreEqual(1, roles.Count());
            Assert.AreEqual(1, roles.FirstOrDefault().Abilities.Count);
            Assert.AreEqual(_ability2, roles.FirstOrDefault().Abilities.FirstOrDefault());
        }