public void GetProperty_InvalidStringValue_ReturnsInvalid(Type type, string stringValue) { var item = new ChangeTypeMapper(type); object value = 1; PropertyMapperResultType result = item.MapCellValue(new ReadCellValueResult(-1, stringValue), ref value); Assert.Equal(PropertyMapperResultType.Invalid, result); Assert.Equal(1, value); }
public void GetProperty_ValidStringValue_ReturnsSuccess(Type type, string stringValue, object expected) { var item = new ChangeTypeMapper(type); object value = 0; PropertyMapperResultType result = item.MapCellValue(new ReadCellValueResult(-1, stringValue), ref value); Assert.Equal(PropertyMapperResultType.Success, result); Assert.Equal(expected, value); }