示例#1
0
        /// <summary>
        /// Start a new set and a new game.
        /// </summary>
        public void StartNewSet()
        {
            if (!Duration.SessionInProgress)
            {
                Start();                              // Start this match
            }
            TennisSet newSet = new TennisSet(this);

            newSet.Start();
            Sets.Add(newSet);

            if (NewSet != null)
            {
                NewSet.Invoke(this, newSet);
            }

            StartNewGame();
        }
示例#2
0
        public void Get_new_sets()
        {
            NewSet set = new NewSet()
            {
                UserId      = Guid.NewGuid(),
                SetId       = "TST2",
                Name        = "Test set",
                Description = "Test set",
                Block       = "Test",
                Type        = "Test",
                BasicLand   = 0,
                Rare        = 0,
                MythicRare  = 0,
                Uncommon    = 0,
                Common      = 0
            };

            NewSet [] sets = repository.GetNewSets();
            Assert.Greater(sets.Length, 0);
        }
示例#3
0
        public void Add_new_set()
        {
            NewSet set = new NewSet()
            {
                UserId      = Guid.NewGuid(),
                Name        = "Test set",
                Description = "Test set",
                Block       = "Test",
                Type        = "Test",
                BasicLand   = 0,
                Rare        = 0,
                MythicRare  = 0,
                Uncommon    = 0,
                Common      = 0
            };

            Guid id = repository.AddSet(set);

            Assert.NotNull(id);
        }
示例#4
0
        public void Update_new_set_staus()
        {
            NewSet set = new NewSet()
            {
                UserId      = Guid.NewGuid(),
                SetId       = "TST3",
                Name        = "Test set",
                Description = "Test set",
                Block       = "Test",
                Type        = "Test",
                BasicLand   = 0,
                Rare        = 0,
                MythicRare  = 0,
                Uncommon    = 0,
                Common      = 0
            };

            Guid id = repository.AddSet(set);

            set = repository.UpdateNewSetStatus(id, "Declined");
            Assert.AreEqual(set.Status, "Declined");
        }
示例#5
0
        public void Get_new_set()
        {
            NewSet set = new NewSet()
            {
                UserId      = Guid.NewGuid(),
                SetId       = "TST",
                Name        = "Test set",
                Description = "Test set",
                Block       = "Test",
                Type        = "Test",
                BasicLand   = 0,
                Rare        = 0,
                MythicRare  = 0,
                Uncommon    = 0,
                Common      = 0
            };

            Guid id = repository.AddSet(set);

            set = repository.GetSet(id);

            Assert.AreEqual(set.Id, id);
        }