refactored the containsText assertion and added some validation for an assertion declaration