예제 #1
0
        public void Remove_Team_Test()
        {
            // arrange
            string name   = "TestName";
            int    scoreA = 6;
            int    scoreB = 9;
            int    id     = 98;

            //act
            Match testMatch = new Match()
            {
                Name = name, ID = id, TeamAScore = scoreA, TeamBScore = scoreB
            };

            MatchList testmatchList = new MatchList();

            testmatchList.Add(testMatch);
            //testmatchList.Remove(30);


            //assert
            Match lookingMatch = testmatchList.FindByID(id);


            Assert.AreEqual(null, lookingMatch, "Incompatibility in Remove Match from list");
        }
예제 #2
0
        public void Add_Match_Test()
        {
            //arrange
            string name   = "TestName";
            int    scoreA = 6;
            int    scoreB = 9;
            int    id     = 98;

            //act
            Match testMatch = new Match()
            {
                Name = name, ID = id, TeamAScore = scoreA, TeamBScore = scoreB
            };

            MatchList testmatchList = new MatchList();

            testmatchList.Add(testMatch);



            //assert
            Match lookingMatch = testmatchList.FindByID(id);

            Assert.AreEqual(name, lookingMatch.Name, "Incompatibility in Add Match to List");
            Assert.AreEqual(id, lookingMatch.ID, "Incompatibility in Add Match to List");
            Assert.AreEqual(scoreA, lookingMatch.TeamAScore, "Incompatibility in Add Match to List");
            Assert.AreEqual(scoreB, lookingMatch.TeamBScore, "Incompatibility in Add Match to List");
        }