public WhenTestingTheSellin() { var ioc = new Ioc(); var updateStrategyFactory = ioc.Resolve<IUpdateItemStrategyFactory>(); GildedRoseConsole = new Program(updateStrategyFactory); }
public WhenTestingTheQuality() { var ioc = new Ioc(); var updateStrategyFactory = ioc.Resolve<IUpdateItemStrategyFactory>(); GildedRoseConsole = new Program(updateStrategyFactory); //GildedRoseConsole.SetUpdateItemStrategyFactory(updateStrategyFactory); }
//[Ninject.Inject] //public void SetUpdateItemStrategyFactory(IUpdateItemStrategyFactory strategyFactory) //{ // UpdateStrategyFactory = strategyFactory; //} static void Main(string[] args) { System.Console.WriteLine("OMGHAI!"); //Do IOC using Ninject var ioc = new Ioc(); var updateStrategy = ioc.Resolve<IUpdateItemStrategyFactory>(); var app = new Program(updateStrategy) { Items = GetDefaultInventory() }; //app.SetUpdateItemStrategyFactory(updateStrategy); app.UpdateQuality(); System.Console.ReadKey(); }