var context = new DelegatingSpecimenContext(); context.Resolve(typeof(int)); // Returns default value of int (0)
var context = new DelegatingSpecimenContext(); context.RegisterFactoryIn this example, a DelegatingSpecimenContext is created and a factory is registered for the type `int` that always returns the value 42. When `Resolve` is called on the context with the type `int`, the registered value is returned instead of the default value. Overall, Ploeh.AutoFixtureUnitTest.Kernel DelegatingSpecimenContext is a useful package library for customizing how specimens are built and testing scenarios.(() => 42); context.Resolve(typeof(int)); // Returns the registered value of 42