Exemplo n.º 1
0
        public void GivenASetOfPriceData_ReturnTheExpectedBuyAndSellOutput()
        {
            var data   = DataHelper.GetVanillaTestData();
            var sut    = new FindBestTradeOperation();
            var result = sut.Run(data);

            Assert.IsTrue(result == "2(0.98),5(8.68)");
        }
Exemplo n.º 2
0
        public void GivenASetOfPriceDataWithHighValueAsFirstRecord_ReturnTheExpectedBuyAndSellOutput()
        {
            var data   = DataHelper.GetTestDataWithLowValueAsLastRecord();
            var sut    = new FindBestTradeOperation();
            var result = sut.Run(data);

            Assert.IsTrue(result == "2(0.98),5(8.68)");
        }