Restructure custom assertions to a common base class