Inheritance: IInitializable
        public void StrategyInitializesInstanceIfItIsInitializable()
        {
            var instance = new InitializableObject();
            var reference = new InstanceReference { Instance = instance };

            strategy.Activate(contextMock.Object, reference);
            instance.WasInitialized.ShouldBeTrue();
        }
        public void StrategyInitializesInstanceIfItIsInitializable()
        {
            var instance = new InitializableObject();

            contextMock.SetupGet(x => x.Instance).Returns(instance);
            strategy.Activate(contextMock.Object);

            instance.WasInitialized.ShouldBeTrue();
        }
Esempio n. 3
0
        public void StrategyInitializesInstanceIfItIsInitializable()
        {
            var instance  = new InitializableObject();
            var reference = new InstanceReference {
                Instance = instance
            };

            this.strategy.Activate(this.contextMock.Object, reference);
            instance.WasInitialized.Should().BeTrue();
        }