private void ShouldReturnNullWhenEmpty( DataTypeAttributeExtractor sut) { var dataTypeAttribute = sut.GetDataTypeAttribute(new object[] { }); Assert.Null(dataTypeAttribute); }
private void ShouldReturnNullWhenNotFound( object[] customAttributes, DataTypeAttributeExtractor sut) { var dataTypeAttribute = sut.GetDataTypeAttribute(customAttributes); Assert.Null(dataTypeAttribute); }
private void ShouldReturnMetaData( IEnumerable <object> customAttributes, DataTypeAttributeExtractor sut, DataTypeAttribute expectedAttribute) { customAttributes = customAttributes.Append(expectedAttribute); var dataTypeAttribute = sut.GetDataTypeAttribute(customAttributes.ToArray()); Assert.Same(expectedAttribute, dataTypeAttribute); }
private void ShouldReturnThrowInvalidOperationException( IEnumerable <DataTypeAttribute> customAttributes, DataTypeAttributeExtractor sut) { Assert.Throws <InvalidOperationException>(() => sut.GetDataTypeAttribute(customAttributes.ToArray <object>())); }
private void ShouldThrowArgumentNullException(DataTypeAttributeExtractor sut) { Assert.Throws <ArgumentNullException>(() => sut.GetDataTypeAttribute(null)); }