Beispiel #1
0
        public void add_odata_api_explorer_should_configure_mvc()
        {
            // arrange
            var services = new ServiceCollection();

            // act
            services.AddODataApiExplorer();

            // assert
            services.Single(sd => sd.ServiceType == typeof(IApiVersionDescriptionProvider)).ImplementationType.Should().Be(typeof(DefaultApiVersionDescriptionProvider));
            services.Single(sd => sd.ImplementationType == typeof(VersionedApiDescriptionProvider)).ServiceType.Should().Be(typeof(IApiDescriptionProvider));
            services.Single(sd => sd.ImplementationType == typeof(ODataApiDescriptionProvider)).ServiceType.Should().Be(typeof(IApiDescriptionProvider));
        }