Skip to content

Consider adding a test helper library #182

@sharwell

Description

@sharwell

vs-mef works well for testing applications, but it can be difficult to create and manage IExportProviderFactory instances that provide ideal behavior for testing. dotnet/roslyn has been iterating on this concept, and currently uses the following two types as the core of the testing functionality:

  • TestComposition: Assists in caching IExportProviderFactory instances for equivalent compositions
  • ExportProviderCache: Ensures that only one ExportProvider is created in the context of a given test
  • UseExportProviderAttribute: Ensures that an ExportProvider created by one test is not reused outside the context of that test

It may be worth building a library with tools to assist other application developers write tests with one or more of these concepts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions