Closed arturdryomov closed 11 years ago
We definitely cannot be mutating the input (the Cursor
) inside an assertion. However, I think you can accomplish the same thing using getColumnNames()
:
assertThat(actual.getColumnNames()) //
.overridingErrorMessage("Expected to have column <%s> but did not.", column) //
.contains(column);
Yep, it works and it’s more elegant solution. Thank you, Jake.
Awesome. Thanks!
I’m still not sure about this assertion goodness because of it’s side-effect (moving a cursor) :-?