Beispiel #1
0
        public void commands_get_injected_with_DirectCommandMap_instance()
        {
            IDirectAsyncCommandMap actual = null;

            injector.Map(typeof(Action <IDirectAsyncCommandMap>), "ReportingFunction").ToValue((Action <IDirectAsyncCommandMap>) delegate(IDirectAsyncCommandMap passed)
            {
                actual = passed;
            });

            subject.Map <DirectAsyncCommandMapReportingAsyncCommand>().Execute();

            Assert.That(actual, Is.EqualTo(subject));
        }
Beispiel #2
0
        public void sandboxed_directCommandMap_instance_does_not_leak_into_system()
        {
            IDirectAsyncCommandMap actual = injector.GetInstance <IDirectAsyncCommandMap>();

            Assert.That(actual, Is.Not.EqualTo(subject));
        }