Beispiel #1
0
 private void ShouldThrowArgumentNullExceptionForTypeCodeExtractor(
     IStringPropertyTypeMap stringPropertyTypeMap,
     IDataTypeAttributeExtractor dataTypeAttributeExtractor
     )
 {
     Assert.Throws <ArgumentNullException>(() => new StringMetaProvider(stringPropertyTypeMap, null, dataTypeAttributeExtractor));
 }
Beispiel #2
0
 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!");
     }
 }
Beispiel #3
0
        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));
        }