elsa-core/test/shared/Elsa.Testing.Shared/AutoFixture/SpecimenBuilders/SpecimenContextExtensions.cs
Craig Fowler 8e16f5f269 Related to #761 - Refactor complex conversion
This removes all of the (now actually non-trivial) conversion logic from
the class which is actually responsible for executing the Jint engine.
This moves it all to a new service which uses chain of responsibility to
convert the result, using one of a few different mechanisms.

Of note is the handling of ExpandoObject when no specific type
information has been provided, and also the handling of enumerables,
with the exception of strings.
2021-04-01 20:25:09 +02:00

9 lines
252 B
C#

using AutoFixture.Kernel;
namespace Elsa.Testing.Shared.AutoFixture.SpecimenBuilders
{
public static class SpecimenContextExtensions
{
public static T Resolve<T>(this ISpecimenContext context) => (T) context.Resolve(typeof(T));
}
}