Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 701 Bytes

File metadata and controls

45 lines (32 loc) · 701 Bytes

Summary

Try to avoid

  • Cleanup of shared state
def setup() {
-   removeAllDocuments()
}
def setup() {
-   wireMockServer.resetAll()
-   wireMockServer.resetScenarios()
}
  • Creating entities with same id/unique element
-   def id = '2'
+   def id = getRandomId()
  • Using not precise enough assertions
-   countDocuments() == 1
+   documentExistsInDatabase(id)
-   countPublishedEvents() == 1
+   countPublishedEvents(id) == 1

home