public override string FieldToString(object from) { if (from == null) return string.Empty; if (_lookup.ContainsKey(from)) return _lookup[from]; return base.FieldToString(from); }
public void From_transaction_code() { // Arrange var c = new EnumConverter(typeof(TransactionCode)); // Act var result = c.FieldToString(TransactionCode.CreditItem); // Assert Assert.AreEqual("50", result); }