Skip to content
This repository has been archived by the owner on Jun 30, 2023. It is now read-only.

Added support for custom mocks #16

Merged
merged 1 commit into from
Jan 16, 2018
Merged

Added support for custom mocks #16

merged 1 commit into from
Jan 16, 2018

Conversation

kzu
Copy link
Member

@kzu kzu commented Jan 15, 2018

A new analyzer provides additional "Implement stunt" and "Implement though
behavior pipeline" code fixes for built-in interface and abstract class
missing implementation diagnostics, which allows you to manually create
mocks/stunts in whatever namespace you want, with whichever interfaces
you want.

This feature supports advanced custom mocking scenarios by giving the user
full control of the code generation.

The underlying processors were refactored a bit to allow more granular
control and reusability for this scenario, such as extracing the default
imports into its own processor DefaultImports.cs, and the core IStunt
interface implementation into its own CSharpStunt.cs and VisualBasicStunt.cs.

Generator method type arguments validation has also been added as analyzers
so we can detect this invalid scenario even before trying to generate code
for it.

A new analyzer provides additional "Implement stunt" and "Implement though
behavior pipeline" code fixes for built-in interface and abstract class
missing implementation diagnostics, which allows you to manually create
mocks/stunts in whatever namespace you want, with whichever interfaces
you want.

This feature supports advanced custom mocking scenarios by giving the user
full control of the code generation.

The underlying processors were refactored a bit to allow more granular
control and reusability for this scenario, such as extracing the default
imports into its own processor `DefaultImports.cs`, and the core IStunt
interface implementation into its own `CSharpStunt.cs` and `VisualBasicStunt.cs`.

Generator method type arguments validation has also been added as analyzers
so we can detect this invalid scenario even before trying to generate code
for it.
@kzu kzu merged commit 1473a32 into master Jan 16, 2018
@kzu kzu deleted the custom-mocks branch January 16, 2018 06:19
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant