public void Validate_WhenEverythingValid_ReturnsTrue()
        {
            string  validCurrency    = "USDAUD";
            int     validTradeAmount = 10;
            decimal validTradePrice  = 39m;
            var     data             = new string[] { $"{validCurrency}", $"{validTradeAmount}", $"{validTradePrice}" };

            var result = _tradeValidator.Validate(data);

            Assert.IsTrue(result);
        }
        public IEnumerable <TradeRecord> Parse(IEnumerable <string> tradeData)
        {
            var trades    = new List <TradeRecord>();
            var lineCount = 1;

            foreach (var line in tradeData)
            {
                var fields = line.Split(new char[] { ',' });
                if (!tradeValidator.Validate(fields))
                {
                    continue;
                }
                var trade = tradeMapper.Map(fields);
                trades.Add(trade);
                lineCount++;
            }
            return(trades);
        }