public void GetOrAddOperation_Argument_Fields() { //arrange Func <FilterOperationDescriptorBase> factory = () => CreateOperation(FilterOperationKind.Equals); //act //assert ArgumentNullException assertNullException = Assert.Throws <ArgumentNullException>( () => FilterFieldCollectionExtensions.GetOrAddOperation( null, FilterOperationKind.Equals, factory)); Assert.Equal("fields", assertNullException.ParamName); }
public void GetOrAddDescriptor_Argument_Fields() { //arrange Func <StringFilterFieldDescriptor> factory = () => new StringFilterFieldDescriptor(_descriptorContext, _propertyInfo); //act //assert ArgumentNullException assertNullException = Assert.Throws <ArgumentNullException>( () => FilterFieldCollectionExtensions.GetOrAddDescriptor( null, _propertyInfo, factory)); Assert.Equal("fields", assertNullException.ParamName); }