public void Register_TypeConverter_Services_Is_Null() { // arrange // act Action action = () => TypeConverterServiceCollectionExtensions .AddTypeConverter <IntToStringConverter>(null); // assert Assert.Throws <ArgumentNullException>(action); }
public void Register_DelegateTypeConverter_Services_Is_Null() { // arrange // act Action action = () => TypeConverterServiceCollectionExtensions .AddTypeConverter <int, string>( null, from => from.ToString() + "_123"); // assert Assert.Throws <ArgumentNullException>(action); }
public void Register_DelegateTypeConverter_Delegate_Is_Null() { // arrange var services = new ServiceCollection(); // act Action action = () => TypeConverterServiceCollectionExtensions .AddTypeConverter <int, string>( services, null); // assert Assert.Throws <ArgumentNullException>(action); }