Ejemplo n.º 1
0
        public static IMatchVw CreateMatch(long id, bool isLiveBet = false, bool isOutright = false)
        {
            var match = new TestMatchVw()
            {
                LineObject = new MatchLn()
                {
                    BtrMatchId = id
                },
                SportView             = TestGroupVw.CreateGroup(id, true),
                CategoryView          = TestGroupVw.CreateGroup(id, false),
                TournamentView        = TestGroupVw.CreateGroup(id, false),
                VisibleBetDomainCount = 10,
                AllVisibleOddCount    = 10,
                IsOutright            = isOutright,
                IsLiveBet             = isLiveBet,
                IsEnabled             = true,
                Name            = "Test",
                StartDate       = DateTime.Now,
                Visibility      = Visibility.Visible,
                SportDescriptor = id.ToString(),
            };

            if (!isLiveBet)
            {
                match.StartDate = DateTime.Now.AddDays(1);
            }
            match.TournamentView = TestGroupVw.CreateGroup(id, false);
            return(match);
        }
Ejemplo n.º 2
0
        public static IGroupVw CreateGroup(long id, bool isSport)
        {
            var group = new TestGroupVw();

            group.DisplayName        = "groupname" + id;
            group.LineObject         = new GroupLn();
            group.LineObject.GroupId = id;
            if (isSport)
            {
                group.LineObject.Type = "group_sport";
                group.LineObject.GroupSport.SportDescriptor = "groupname" + id;
            }
            else
            {
                group.LineObject.Type = "group_tournament";
            }
            return(group);
        }