public static void RegisterType <TService>(this BaseTest baseTest) where TService : class { baseTest.Container.Register(Component.For <TService>().ImplementedBy <TService>().LifestyleSingleton()); }
public static void RegisterMock <TObject>(this BaseTest baseTest, Mock <TObject> mock) where TObject : class { baseTest.RegisterInstance(mock); baseTest.RegisterInstance(mock.Object); }
public static TService Resolve <TService>(this BaseTest baseTest) { return(baseTest.Container.Resolve <TService>()); }
public static void RegisterInstance <TImpl>(this BaseTest baseTest, TImpl service) where TImpl : class { baseTest.Container.Register(Component.For <TImpl>().Instance(service)); }