assertText method

void assertText(
  1. String expected
)

Asserts body equals expected.

Implementation

void assertText(String expected) {
  if (body != expected) {
    throw TestAssertionError('expected body "$expected", got "$body"');
  }
}