public void FilterOutrights()
        {
            MyRegionManager.Setup(x => x.NavigatBack(RegionNames.ContentRegion)).Returns(null);
            var match = TestMatchVw.CreateMatch(1, false, false) as TestMatchVw;

            match.ExpiryDate = DateTime.Now.AddMinutes(-5);
            ChangeTracker.Setup(x => x.CurrentMatch).Returns(match);
            var model = new BetDomainsViewModel();

            for (int i = 0; i < 5000; i++)
            {
                Thread.Sleep(1);
            }

            MyRegionManager.Verify(x => x.NavigatBack(RegionNames.ContentRegion), Times.Once);;
        }
示例#2
0
        public static IMatchLn CreateMatch(long id, bool livebet, bool isOutright = false)
        {
            var match = new TestMatchLn()
            {
                MatchId       = id,
                BtrMatchId    = id,
                Active        = { Value = true },
                IsLiveBet     = { Value = livebet },
                StartDate     = { Value = new DateTimeSr(DateTime.Now.AddHours(3)) },
                ExpiryDate    = { Value = new DateTimeSr(DateTime.Now.AddHours(3)) },
                outright_type = isOutright ? eOutrightType.Outright : eOutrightType.None,
            };

            match.MatchView = TestMatchVw.CreateMatch(id, livebet, isOutright);
            //match.ParentGroups.Add(TestGroupLn.CreateGroup(GroupLn.GROUP_TYPE_SPORT));
            //match.BetDomains = new BetDomainList(match);

            return(match);
        }