public void ShouldHavePriorityWithDefaultValue() { var testPlugin = new ViewDataTestPlugin(); Assert.IsAssignableFrom <IDefaultRegistrationPlugin>(testPlugin); Assert.NotNull(testPlugin); Assert.Equal(-1000, testPlugin.Priority); }
public void ShouldInvokeMethodOfTypeVoidWithValidServiceCollection() { var testPlugin = new ViewDataTestPlugin(); var serviceCollection = new ServiceCollection(); testPlugin.DefaultServiceRegistrationDelegate(serviceCollection); Assert.True(serviceCollection.Count == 157); }
public void ShouldInvokeMethodOfTypeVoidWithValidServiceCollection() { var testPlugin = new ViewDataTestPlugin(); 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(JsonResultExecutor)); }
public void ShouldThrowArgumentNullExceptionWithInvalidServiceCollection() { var testPlugin = new ViewDataTestPlugin(); Assert.Throws <ArgumentNullException>(() => testPlugin.DefaultServiceRegistrationDelegate(null)); }