{"action":"created","issue":{"url":"https://api.github.com/repos/Azure/azure-functions-durable-extension/issues/414","repository_url":"https://api.github.com/repos/Azure/azure-functions-durable-extension","labels_url":"https://api.github.com/repos/Azure/azure-functions-durable-extension/issues/414/labels{/name}","comments_url":"https://api.github.com/repos/Azure/azure-functions-durable-extension/issues/414/comments","events_url":"https://api.github.com/repos/Azure/azure-functions-durable-extension/issues/414/events","html_url":"https://github.com/Azure/azure-functions-durable-extension/issues/414","id":354439274,"node_id":"MDU6SXNzdWUzNTQ0MzkyNzQ=","number":414,"title":"Make Activity Functions Testable by Creating IDurableActivityContext or DurableActivityContextBase","user":{"login":"jakingmsft","id":42750359,"node_id":"MDQ6VXNlcjQyNzUwMzU5","avatar_url":"https://avatars3.githubusercontent.com/u/42750359?v=4","gravatar_id":"","url":"https://api.github.com/users/jakingmsft","html_url":"https://github.com/jakingmsft","followers_url":"https://api.github.com/users/jakingmsft/followers","following_url":"https://api.github.com/users/jakingmsft/following{/other_user}","gists_url":"https://api.github.com/users/jakingmsft/gists{/gist_id}","starred_url":"https://api.github.com/users/jakingmsft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jakingmsft/subscriptions","organizations_url":"https://api.github.com/users/jakingmsft/orgs","repos_url":"https://api.github.com/users/jakingmsft/repos","events_url":"https://api.github.com/users/jakingmsft/events{/privacy}","received_events_url":"https://api.github.com/users/jakingmsft/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-27T19:06:09Z","updated_at":"2018-08-27T19:17:43Z","closed_at":"2018-08-27T19:17:43Z","author_association":"NONE","body":"At present time, an activity function must take in as a parameter a [DurableActivityContext](https://github.com/Azure/azure-functions-durable-extension/blob/master/src/WebJobs.Extensions.DurableTask/DurableActivityContext.cs) which is not an `abstract class` or an `interface`. This makes it difficult to create unit tests for activity functions because input needs to be passed in through `context.GetInput<T>()`."},"comment":{"url":"https://api.github.com/repos/Azure/azure-functions-durable-extension/issues/comments/416337294","html_url":"https://github.com/Azure/azure-functions-durable-extension/issues/414#issuecomment-416337294","issue_url":"https://api.github.com/repos/Azure/azure-functions-durable-extension/issues/414","id":416337294,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjMzNzI5NA==","user":{"login":"cgillum","id":2704139,"node_id":"MDQ6VXNlcjI3MDQxMzk=","avatar_url":"https://avatars2.githubusercontent.com/u/2704139?v=4","gravatar_id":"","url":"https://api.github.com/users/cgillum","html_url":"https://github.com/cgillum","followers_url":"https://api.github.com/users/cgillum/followers","following_url":"https://api.github.com/users/cgillum/following{/other_user}","gists_url":"https://api.github.com/users/cgillum/gists{/gist_id}","starred_url":"https://api.github.com/users/cgillum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cgillum/subscriptions","organizations_url":"https://api.github.com/users/cgillum/orgs","repos_url":"https://api.github.com/users/cgillum/repos","events_url":"https://api.github.com/users/cgillum/events{/privacy}","received_events_url":"https://api.github.com/users/cgillum/received_events","type":"User","site_admin":false},"created_at":"2018-08-27T19:17:43Z","updated_at":"2018-08-27T19:17:43Z","author_association":"COLLABORATOR","body":"This is true, but it generally shouldn't be needed. See our unit test documentation here: https://docs.microsoft.com/en-us/azure/azure-functions/durable-functions-unit-testing#unit-testing-activity-functions\r\n\r\n> Activity functions can be unit tested in the same way as non-durable functions. Activity functions don't have a base class for mocking. So the unit tests use the parameter types directly.\r\n\r\nIn other words, it's not necessary to use `DurableActivityContext` as your parameter type. You can use `T` directly as the parameter type."}}
{"actor":{"display_login":"cgillum"}}