Exemple #1
0
        public void Compose()
        {
            var component      = new SingletonComponent <ITestComponent, TestComponent>();
            var composeResultA = component.Compose(this.Composer, false, this.ConstructorSelector);
            var composeResultB = component.Compose(this.Composer, false, this.ConstructorSelector);

            Assert.Equal(composeResultA, composeResultB);
        }
Exemple #2
0
        public void Dispose()
        {
            var component = new SingletonComponent <ITestComponent, TestComponent>();

            component.Dispose();

            Assert.Throws <ObjectDisposedException>(
                () => component.Compose(this.Composer, false, this.ConstructorSelector));
        }
Exemple #3
0
        public void ComposeWithNullComposer()
        {
            Assert.Throws <ArgumentNullException>(
                () =>
            {
                var component = new SingletonComponent <ITestComponent, TestComponent>();

                component.Compose(null, false, this.ConstructorSelector);
            });
        }