Exemple #1
0
        public void CreateMatch_ValidMatchAPI_CreatedMatchHasCorrectWinner()
        {
            MatchAPI mAPI = validMatchAPI();

            Match m = mAPI.CreateMatch("testdb");

            Assert.IsTrue(m.Team2.Winner);
        }
Exemple #2
0
        public void CreateMatch_ValidMatchAPI_CreatedMatchTeam2Has5Participants()
        {
            MatchAPI mAPI = validMatchAPI();

            Match m = mAPI.CreateMatch("testdb");

            Assert.AreEqual(5, m.Team2.Participants.Count);
        }
Exemple #3
0
        public void CreateMatch_ValidMatchAPI_CreatedMatchHasSameIdAsMatchAPI()
        {
            MatchAPI mAPI = validMatchAPI();

            Match m = mAPI.CreateMatch("testdb");

            Assert.AreEqual(mAPI.MatchId, m.MatchId);
        }
Exemple #4
0
        public void CreateMatch_ValidMatchAPI_MatchIsCreated()
        {
            MatchAPI m = validMatchAPI();

            Assert.IsInstanceOfType(
                m.CreateMatch("testdb"),
                typeof(Match));
        }
Exemple #5
0
        public void CreateMatch_InvalidMatchAPI_NullReferenceExceptionThrown()
        {
            MatchAPI m = invalidMatchAPI();

            Match match = m.CreateMatch("testdb");
        }