Example #1
0
 public void Registration()
 {
     ExportContext context = new ExportContext();
     ThingExporter exporter = new ThingExporter();
     context.Register(exporter);
     Assert.AreSame(exporter, context.FindExporter(typeof(Thing)));
 }
Example #2
0
        public void Registration()
        {
            ExportContext context  = new ExportContext();
            ThingExporter exporter = new ThingExporter();

            context.Register(exporter);
            Assert.AreSame(exporter, context.FindExporter(typeof(Thing)));
        }
        public void RegistrationIsPerContext()
        {
            var context  = new ExportContext();
            var exporter = new ThingExporter();

            context.Register(exporter);
            context = new ExportContext();
            Assert.AreNotSame(exporter, context.FindExporter(typeof(Thing)));
        }