예제 #1
0
        public void AddSolutionCalculator_ShouldAddsISolutionCalculatorService()
        {
            // Arrange
            var services = new ServicesCollectionStub();

            // Act
            services.AddSolutionCalculator();

            // Assert
            services.Should().Contain(x => x.Lifetime == ServiceLifetime.Transient && x.ServiceType == typeof(ISolutionCalculator));
        }
예제 #2
0
        public void AddRectangleGenerator_ShouldAddsIRectangleGeneratorService()
        {
            // Arrange
            var services = new ServicesCollectionStub();

            // Act
            services.AddRectangleGenerator();

            // Assert
            services.Should().Contain(x => x.Lifetime == ServiceLifetime.Singleton && x.ServiceType == typeof(IRectangleGenerator));
        }
예제 #3
0
        public void AddAutoMapper_ShouldAddIMapperService()
        {
            // Arrange
            var services = new ServicesCollectionStub();

            // Act
            services.AddAutoMapper();

            // Assert
            services.Should().Contain(x => x.Lifetime == ServiceLifetime.Singleton && x.ServiceType == typeof(IMapper));
        }