예제 #1
0
        public void ConventionBasedStartup_GetConfigureServicesMethod_NoMethodFound()
        {
            // Arrange
            var startup = new ConventionBasedStartup(new MyStartup2());

            // Act
            var method = startup.GetConfigureServicesMethod();

            // Assert
            Assert.Null(method);
        }
예제 #2
0
        public void ConventionBasedStartup_GetConfigureServicesMethod_FindsConfigureServices()
        {
            // Arrange
            var startup = new ConventionBasedStartup(new MyStartup1());

            // Act
            var method = startup.GetConfigureServicesMethod();

            // Assert
            Assert.Equal(typeof(IServiceCollection), method.GetParameters()[0].ParameterType);
        }