public void Contains_GenericTypeGiven_ShouldReturnTrueWhenOpenGenericInList() { var target = new TypeFilter(new[] { typeof(IEnumerable<>) }); var result = target.Contains(typeof(IEnumerable<string>)); result.Should().BeTrue(); }
public void GetAllowedServices_ServicesNullValueGiven_ShouldThrowArgumentNullException() { var typeFilter = new TypeFilter(); typeFilter.GetAllowedServices(ProxyGenerator.CreateProxy<Type>(), null); }
public void GetAllowedServices_ImplementationNullValueGiven_ShouldThrowArgumentNullException() { var typeFilter = new TypeFilter(); typeFilter.GetAllowedServices(null, new [] {ProxyGenerator.CreateProxy<Type>(), ProxyGenerator.CreateProxy<Type>()}); }
public void AddFilter_FilterNullValueGiven_ShouldThrowArgumentNullException() { var typeFilter = new TypeFilter(); typeFilter.AddFilter(null); }
public void Contains_TypeNullValueGiven_ShouldThrowArgumentNullException() { var typeFilter = new TypeFilter(); typeFilter.Contains(null); }
public void ExcludeType_TypeNullValueGiven_ShouldThrowArgumentNullException() { var typeFilter = new TypeFilter(); typeFilter.ExcludeType(null); }
IServiceFilter IBehaviorConfiguration.GetServiceFilter() { var typeFilter = new TypeFilter(excludedServices); typeFilter.AddFilter(filter); return typeFilter; }