Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace AtataContextCleanUpEvent with new AtataContextDeInitEvent and AtataContextDeInitCompletedEvent #780

Closed
YevgeniyShunevych opened this issue Oct 11, 2023 · 0 comments
Assignees
Milestone

Comments

@YevgeniyShunevych
Copy link
Member

The existing AtataContextCleanUpEvent class became marked as obsolete. It should be replaced mostly with AtataContextDeInitEvent. In cases when you do some final stuff, like processing artifacts, you can rather consider subscribing on AtataContextDeInitCompletedEvent.

A couple of event handler classes were renamed (old remain as obsolete):

  • AddArtifactsToNUnitTestContextOnCleanUpEventHandler ->
    AddArtifactsToNUnitTestContextEventHandler
  • AddDirectoryFilesToNUnitTestContextOnCleanUpEventHandler ->
    AddDirectoryFilesToNUnitTestContextEventHandler
  • LogNUnitErrorOnCleanUpEventHandler ->
    LogNUnitErrorEventHandler
  • TakePageSnapshotOnNUnitErrorOnCleanUpEventHandler ->
    TakePageSnapshotOnNUnitErrorEventHandler
  • TakeScreenshotOnNUnitErrorOnCleanUpEventHandler ->
    TakeScreenshotOnNUnitErrorEventHandler

The AtataContextBuilder configuration methods were also changed (old remain as obsolete). The goal is to move event handling configuration functionality to a more logical place, which is EventSubscriptions.

  • LogNUnitError ->
    EventSubscriptions.LogNUnitError
  • TakeScreenshotOnNUnitError ->
    EventSubscriptions.TakeScreenshotOnNUnitError
  • TakePageSnapshotOnNUnitError ->
    EventSubscriptions.TakePageSnapshotOnNUnitError
  • OnCleanUpAddArtifactsToNUnitTestContext ->
    EventSubscriptions.AddArtifactsToNUnitTestContext
  • OnCleanUpAddDirectoryFilesToNUnitTestContext ->
    EventSubscriptions.AddDirectoryFilesToNUnitTestContext

The changes should not affect many of users, as the above classes and methods are not often used directly, but rather UseAllNUnitFeatures method is used, which encapsulates enabling of Atata NUnit features by calling those configuration methods as well.

Additionally in a log "Clean up AtataContext" section was changed to "Deinitialize AtataContext".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant