refactored directory event assertion