Ejemplo n.º 1
0
        public void ConventionBasedStartup_GetConfigureServicesMethod_NoMethodFound()
        {
            // Arrange
            var startup = new ConventionBasedStartup(new MyStartup2());

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

            // Assert
            Assert.Null(method);
        }
Ejemplo n.º 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);
        }