{"action":"created","issue":{"url":"https://api.github.com/repos/xunit/xunit/issues/386","labels_url":"https://api.github.com/repos/xunit/xunit/issues/386/labels{/name}","comments_url":"https://api.github.com/repos/xunit/xunit/issues/386/comments","events_url":"https://api.github.com/repos/xunit/xunit/issues/386/events","html_url":"https://github.com/xunit/xunit/issues/386","id":66888588,"number":386,"title":"Provide test arguments to BeforeAfterTestAttribute?","user":{"login":"axelheer","id":3988385,"avatar_url":"https://avatars.githubusercontent.com/u/3988385?v=3","gravatar_id":"","url":"https://api.github.com/users/axelheer","html_url":"https://github.com/axelheer","followers_url":"https://api.github.com/users/axelheer/followers","following_url":"https://api.github.com/users/axelheer/following{/other_user}","gists_url":"https://api.github.com/users/axelheer/gists{/gist_id}","starred_url":"https://api.github.com/users/axelheer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/axelheer/subscriptions","organizations_url":"https://api.github.com/users/axelheer/orgs","repos_url":"https://api.github.com/users/axelheer/repos","events_url":"https://api.github.com/users/axelheer/events{/privacy}","received_events_url":"https://api.github.com/users/axelheer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-04-07T13:50:53Z","updated_at":"2015-04-07T17:42:51Z","closed_at":null,"body":"To run some general logic for theory arguments, some kind of test method interception would come in handy. Therefor I found the `BeforeAfterTestAttribute`, which unfortunately has only access to the test method's `MethodInfo`. Since these attributes are being invoked by `XunitTestInvoker`, which could provide the test method's arguments, maybe just that would make sense?\r\n\r\nOr is there another chance to runs some code before and after any theory, which is able to access the theory data? Strictly speaking this code would be part of the test, thus \"before test\" / \"after test\" does not sound that right."},"comment":{"url":"https://api.github.com/repos/xunit/xunit/issues/comments/90666884","html_url":"https://github.com/xunit/xunit/issues/386#issuecomment-90666884","issue_url":"https://api.github.com/repos/xunit/xunit/issues/386","id":90666884,"user":{"login":"bradwilson","id":16944,"avatar_url":"https://avatars.githubusercontent.com/u/16944?v=3","gravatar_id":"","url":"https://api.github.com/users/bradwilson","html_url":"https://github.com/bradwilson","followers_url":"https://api.github.com/users/bradwilson/followers","following_url":"https://api.github.com/users/bradwilson/following{/other_user}","gists_url":"https://api.github.com/users/bradwilson/gists{/gist_id}","starred_url":"https://api.github.com/users/bradwilson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradwilson/subscriptions","organizations_url":"https://api.github.com/users/bradwilson/orgs","repos_url":"https://api.github.com/users/bradwilson/repos","events_url":"https://api.github.com/users/bradwilson/events{/privacy}","received_events_url":"https://api.github.com/users/bradwilson/received_events","type":"User","site_admin":false},"created_at":"2015-04-07T17:42:51Z","updated_at":"2015-04-07T17:42:51Z","body":"BeforeAfter attributes were designed to be completely orthogonal to any specific test; this is why they have ambient information about the test (`MethodInfo`), but no actual data (no instance of the test class, for example)."}}