public void ShouldHavePriorityWithDefaultValue() { var testPlugin = new LiteTestPlugin(); Assert.IsAssignableFrom <IDefaultRegistrationPlugin>(testPlugin); Assert.NotNull(testPlugin); Assert.Equal(0, testPlugin.Priority); }
public void ShouldInvokeMethodOfTypeVoidWithValidServiceCollection() { var testPlugin = new LiteTestPlugin(); var serviceCollection = new ServiceCollection(); testPlugin.DefaultServiceRegistrationDelegate(serviceCollection); var methodReturnType = testPlugin.DefaultServiceRegistrationDelegate.Method.ReturnType.Name; Assert.True(methodReturnType == "Void"); Assert.Contains(serviceCollection, s => s.ServiceType == typeof(CorsAuthorizationFilter)); }
public void ShouldThrowArgumentNullExceptionWithInvalidServiceCollection() { var testPlugin = new LiteTestPlugin(); Assert.Throws <ArgumentNullException>(() => testPlugin.DefaultServiceRegistrationDelegate(null)); }