Exemplo n.º 1
0
        public void choose_EnglishGreeter_for_IGreeter()
        {
            var container = new MinimalContainer();

            container.Register <IGreeter, EnglishGreeter>();

            var greeter = container.Create <IGreeter>();
            var result  = greeter.SayHello();

            Assert.AreEqual("Hello!", result);
        }
Exemplo n.º 2
0
 private void test()
 {
     var container = new MinimalContainer();
     //container.Register<IOtherInterface, EnglishGreeter>(); <--- doesn't work (good)
 }