public void FindBestDaysToTradeOn_NoStocks()
        {
            // Arrange
            List <Stock> stocks = new List <Stock>();

            // Act
            MostProfitableStocks mostProfitableStocks = ProfitableStockFinder.FindMostProfitableStocks(stocks);

            // Assert
            mostProfitableStocks.Should().BeNull();
        }
        public void FindBestDaysToTradeOn_NoDifferenceInMonthlystockPrice()
        {
            // Arrange
            List <Stock> stocks = new List <Stock>
            {
                new Stock
                {
                    Day   = 1,
                    Price = 1.00
                },
                new Stock
                {
                    Day   = 2,
                    Price = 1.00
                },
                new Stock
                {
                    Day   = 3,
                    Price = 1.00
                },
                new Stock
                {
                    Day   = 4,
                    Price = 1.00
                },
                new Stock
                {
                    Day   = 5,
                    Price = 1.00
                },
            };

            // Act
            MostProfitableStocks mostProfitableStocks = ProfitableStockFinder.FindMostProfitableStocks(stocks);

            // Assert
            mostProfitableStocks.StockToBuy.Day.Should().Be(stocks[3].Day);
            mostProfitableStocks.StockToSell.Day.Should().Be(stocks[4].Day);
        }
        public void FindBestDaysToTradeOn_Valid()
        {
            // Arrange
            List <Stock> stocks = new List <Stock>
            {
                new Stock
                {
                    Day   = 1,
                    Price = 1.00
                },
                new Stock
                {
                    Day   = 2,
                    Price = 2.00
                }
            };

            // Act
            MostProfitableStocks mostProfitableStocks = ProfitableStockFinder.FindMostProfitableStocks(stocks);

            // Assert
            mostProfitableStocks.StockToBuy.Should().BeEquivalentTo(stocks.First());
            mostProfitableStocks.StockToSell.Should().BeEquivalentTo(stocks.Last());
        }