private void ShouldThrowArgumentNullExceptionForTypeCodeExtractor( IStringPropertyTypeMap stringPropertyTypeMap, IDataTypeAttributeExtractor dataTypeAttributeExtractor ) { Assert.Throws <ArgumentNullException>(() => new StringMetaProvider(stringPropertyTypeMap, null, dataTypeAttributeExtractor)); }
private void ShouldThrowArgumentNullExceptionForDataTypeAtrtibuteExtractor( ITypeCodeExtractor typeCodeExtractor, IStringPropertyTypeMap stringPropertyTypeMap ) { Assert.Throws <ArgumentNullException>(() => new StringMetaProvider(stringPropertyTypeMap, typeCodeExtractor, null)); }
private void ShouldCreateInstance( IStringPropertyTypeMap stringPropertyTypeMap, ITypeCodeExtractor typeCodeExtractor, IDataTypeAttributeExtractor dataTypeAttributeExtractor ) { try { var _ = new StringMetaProvider(stringPropertyTypeMap, typeCodeExtractor, dataTypeAttributeExtractor); } catch { Assert.True(false, "Exception was thrown when none was expected!"); } }
public StringMetaProvider( IStringPropertyTypeMap stringPropertyTypeMap, ITypeCodeExtractor typeCodeExtractor, IDataTypeAttributeExtractor dataTypeAttributeExtractor) { _stringPropertyTypeMap = stringPropertyTypeMap ?? throw new ArgumentNullException(nameof(stringPropertyTypeMap)); _typeCodeExtractor = typeCodeExtractor ?? throw new ArgumentNullException(nameof(typeCodeExtractor)); _dataTypeAttributeExtractor = dataTypeAttributeExtractor ?? throw new ArgumentNullException(nameof(dataTypeAttributeExtractor)); }