public void TestFactoryRegisterNull() { //Given IValueExpressionGenerator conv = null; //Then Assert.ThrowsAny <ArgumentNullException>(() => ValueExpressionGeneratorFactory.Register(conv)); }
public static void Register(IValueExpressionGenerator converter) { if (converter == null) { throw new ArgumentNullException(nameof(converter)); } _converters[converter.GeneratingType] = converter; }