예제 #1
0
        public void Injector_Should_Register_All_Singleton_Iterfaces()
        {
            // Arrange
            var injector = new Injector();

            injector.AllImplementationsSingleton <MultipleInterfacesClass>();

            // Action
            var first  = injector.Get <ISample>();
            var second = injector.Get <ICloneable>();

            // Assert
            first.Should().NotBeNull();
            second.Should().NotBeNull();
            first.Should().BeSameAs(second);
        }