Ejemplo n.º 1
0
        public void GetShouldReturnEmptyCollectionWhenThereIsOnlyOneOddName()
        {
            IEnumerable <OddFeedModel> odds = oddsProvider.Get(OddsProviderStub.GetHandicapMarketNodeWithValues(), new List <string>()
            {
                "TestName"
            });

            Assert.IsFalse(odds.Any());
        }
Ejemplo n.º 2
0
        public void GetShouldReturnTwoOddsWithValuesWhenMarketNodeContainsTwoValidOdds()
        {
            IEnumerable <OddFeedModel> odds = oddsProvider.Get(OddsProviderStub.GetHandicapMarketNodeWithValues(), validOddNames);

            Assert.AreEqual(2, odds.Count());
            Assert.IsTrue(odds.All(x => x.Value > 0));
            Assert.IsTrue(odds.All(x => x.Header > 0));
            Assert.IsFalse(odds.All(x => string.IsNullOrEmpty(x.Symbol)));
            Assert.AreEqual(0, odds.First().Rank);
            Assert.AreEqual(1, odds.Last().Rank);
            Assert.IsFalse(odds.All(x => x.IsSuspended));
            Assert.IsFalse(odds.All(x => string.IsNullOrEmpty(x.Name)));
        }