Beispiel #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));
        }
Beispiel #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));
        }
Beispiel #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));
        }