BoDi.Tests.ObjectCreationTests.ShouldNotFireObjectCreatedEventOnSecondResolve C# (CSharp) Метод

ShouldNotFireObjectCreatedEventOnSecondResolve() приватный Метод

private ShouldNotFireObjectCreatedEventOnSecondResolve ( ) : void
Результат void
        public void ShouldNotFireObjectCreatedEventOnSecondResolve()
        {
            // given
            object objectCreated = null;
            container.ObjectCreated += o => objectCreated = o;

            // when
            var obj1 = container.Resolve<IInterface1>();
            objectCreated = null;
            var obj2 = container.Resolve<IInterface1>();

            // then

            Assert.IsNull(objectCreated);
        }