I've created a bunch of classes that extend JSchemaGenerationProvider, overriding the bool CanGenerateSchema(JSchemaTypeGenerationContext) and JSchema GetSchem(JSchemaTypeGenerationContext) methods.
I'd like to at least unit test these, but the constructor for JSchemaTypeGenerationContext is internal, so my hands are tied. I can probably get around it by writing wrappers around everything, but it would be cumbersome.
I'm not sure what the best solution would be - probably to make JSchemaTypeGenerationContext implement some interface so it can easily be mocked for testing?
I've created a bunch of classes that extend
JSchemaGenerationProvider
, overriding thebool CanGenerateSchema(JSchemaTypeGenerationContext)
andJSchema GetSchem(JSchemaTypeGenerationContext)
methods.I'd like to at least unit test these, but the constructor for
JSchemaTypeGenerationContext
is internal, so my hands are tied. I can probably get around it by writing wrappers around everything, but it would be cumbersome.I'm not sure what the best solution would be - probably to make
JSchemaTypeGenerationContext
implement some interface so it can easily be mocked for testing?