/// <summary> /// Configure IOC /// </summary> public static void ConfigureIoC() { // base services Context.Container.Register <IContext>(c => ThreadContext.CreateInstance()); Context.Container.Register <IConfigSettings>(c => new AppConfigSettings()); // admin dalc Dalc.Register.RegisterAll(); }
/// <summary> /// Constructor, used to build the testing context /// </summary> public GettingATaskToExecuteInTheCorrectOrder() { var taskDalc = MockRepository.GenerateStub <ITaskDalc>(); ScenarioContext.Current.Add("taskDalc", taskDalc); Context.Container.Register(c => ThreadContext.CreateInstance()); Context.Container.Register <IConfigSettings>(c => new AppConfigSettings()); Context.Container.Register(c => taskDalc); }
public void Init() { BasePath = AppDomain.CurrentDomain.BaseDirectory; // IOC Context.Container.Register <IDataBase>(c => new DataBase()); Context.Container.Register <IContext>(c => ThreadContext.CreateInstance()); Context.Container.Register <IConfigSettings>(c => new AppConfigSettings()); // assembly generator Context.Container.Register <IAssemblyGenerator>(c => new AssemblyGenerator()); // admin dalc Lesula.Admin.Dalc.Register.RegisterAll(); }