コード例 #1
0
        public void PrepareData_Split1800Provided_BuyAndSellQuantityMustBeTheSame()
        {
            var data = _service.PrepareData(1800);

            var allActions  = data[0].ForexData.Select(x => x.Action.ToString()).ToList();
            var buyActions  = allActions.Count(x => x == "Buy");
            var sellActions = allActions.Count(x => x == "Sell");

            Assert.AreEqual(buyActions, sellActions);
        }
コード例 #2
0
        public void PrepareData_Split1800Provided_ShouldPreserveAllRecords()
        {
            var data = _service.PrepareData(1800);

            var records = data.Sum(forexDto => forexDto.ForexData.Count);

            Assert.AreEqual(200, records);
        }