public void MapEntity_ConversionSuccess_Test() { var mapping = new CorrectColumnMapping(); var result = mapping.Map(new TokenizedRow(1, new[] { "1" })); Assert.IsTrue(result.IsValid); Assert.AreEqual(1, result.Result.PropertyInt); Assert.DoesNotThrow(() => result.ToString()); }
public void MapEntity_ConversionError_Test() { var mapping = new CorrectColumnMapping(); var result = mapping.Map(new TokenizedRow(1, new[] { string.Empty })); Assert.IsFalse(result.IsValid); Assert.AreEqual("Column 0 with Value '' cannot be converted", result.Error.Value); Assert.AreEqual(0, result.Error.ColumnIndex); Assert.DoesNotThrow(() => result.ToString()); }
public void MapEntity_ConversionError_Test() { var mapping = new CorrectColumnMapping(); var result = mapping.Map(new[] { string.Empty }); Assert.IsFalse(result.IsValid); Assert.AreEqual(string.Empty, result.Error.Value); Assert.AreEqual(0, result.Error.ColumnIndex); Assert.DoesNotThrow(() => result.ToString()); }