public static void AssertOwnership <TComponent>(this IComponentContext context, InstanceOwnership ownership) { var cr = context.RegistrationFor <TComponent>(); Assert.Equal(ownership, cr.Ownership); }
public static void AssertLifetime <TComponent, TLifetime>(this IComponentContext context) { var cr = context.RegistrationFor <TComponent>(); Assert.IsType <TLifetime>(cr.Lifetime); }
public static void AssertSharing <TComponent>(this IComponentContext context, InstanceSharing sharing) { var cr = context.RegistrationFor <TComponent>(); Assert.Equal(sharing, cr.Sharing); }
internal static void AssertOwnership <TComponent>(this IComponentContext context, InstanceOwnership ownership) { var registration = context.RegistrationFor <TComponent>(); Assert.Equal(ownership, registration.Ownership); }
internal static void AssertLifetime <TComponent, TLifetime>(this IComponentContext context) { var registration = context.RegistrationFor <TComponent>(); Assert.IsType <TLifetime>(registration.Lifetime); }
internal static void AssertSharing <TComponent>(this IComponentContext context, InstanceSharing sharing) { var registration = context.RegistrationFor <TComponent>(); Assert.Equal(sharing, registration.Sharing); }