public void AssertSuccessFlag_IsTrue()
        {
            var drawRequest = new OpenDrawsRequest()
            {
                CompanyId             = "GoldenCasket",
                MaxDrawCount          = 20,
                OptionalProductFilter = new[] { "TattsLotto", "MonWedLotto", "OzLotto", "MonWedLotto", "Powerball", "Super66" }
            };

            var results = _openDrawsServiceProvider.GetOpenDraws(drawRequest).Result;

            // Assert
            Assert.IsTrue(results.Success);
        }
Example #2
0
        public ActionResult Index()
        {
            var openDrawRequest = new OpenDrawsRequest()
            {
                CompanyId             = ConfigurationManager.AppSettings[AppSettingValues.LottoCompanyId],
                MaxDrawCount          = 10,
                OptionalProductFilter = new[] { "TattsLotto", "MonWedLotto", "OzLotto", "MonWedLotto", "Powerball", "Super66" }
            };

            var latestResultsRequest = new LatestResultsRequest()
            {
                CompanyId = ConfigurationManager.AppSettings[AppSettingValues.LottoCompanyId],
                MaxDrawCountPerProduct = 10,
                OptionalProductFilter  = new[] { "TattsLotto" }
            };

            var viewModel = new Home()
            {
                OpenDrawItems = _openDrawsServiceProvider.GetOpenDraws(openDrawRequest)
                                .Result?.Draws.OrderBy(x => x.DrawDate).ToList(),
                LatestResultItems = _latestResultsServiceProvider.GetLatestResults(latestResultsRequest)
                                    .Result?.DrawResults.OrderBy(x => x.DrawDate).ToList()
            };

            return(View(viewModel));
        }