public void GetShouldReturnEmptyCollectionWhenThereIsOnlyOneOddName()
        {
            IEnumerable <OddFeedModel> odds = oddsProvider.Get(OddsProviderStub.GetThreeWayMarketNodeWithValues(), new List <string>()
            {
                "TestName"
            });

            Assert.IsFalse(odds.Any());
        }
        public void GetShouldReturnThreeOddsWithValuesWhenMarketNodeContainsThreeValidOdds()
        {
            IEnumerable <OddFeedModel> odds = oddsProvider.Get(OddsProviderStub.GetThreeWayMarketNodeWithValues(), validOddNames);

            Assert.AreEqual(3, odds.Count());
            Assert.IsTrue(odds.All(x => x.Value > 0));
            Assert.AreEqual(0, odds.First().Rank);
            Assert.AreEqual(1, odds.Skip(1).First().Rank);
            Assert.AreEqual(2, odds.Last().Rank);
            Assert.IsFalse(odds.All(x => x.IsSuspended));
            Assert.IsTrue(odds.All(x => x.Header == 0));
            Assert.IsTrue(odds.All(x => string.IsNullOrEmpty(x.Symbol)));
            Assert.IsFalse(odds.All(x => string.IsNullOrEmpty(x.Name)));
        }
Exemplo n.º 3
0
        public void GetShouldReturnEmptyCollectionWhenMarketNodeContainsMoreThanTwoOdds()
        {
            IEnumerable <OddFeedModel> odds = oddsProvider.Get(OddsProviderStub.GetThreeWayMarketNodeWithValues(), validOddNames);

            Assert.IsFalse(odds.Any());
        }