Ejemplo n.º 1
0
        public void RepoTeamTestsAddAMainTeam()
        {
            List <MainTeam> db = new List <MainTeam>();

            _teamSet.Object.AddRange(db);
            _teamSet.Setup(o => o.Add(It.IsAny <MainTeam>())).Callback((MainTeam f) => db.Add(f));
            ConnectMocksToDataStore(db);
            MainTeam t = new MainTeam {
                MainTeamID = 0
            };
            bool            result   = _repo.AddNewMainTeam(t);
            List <MainTeam> expected = new List <MainTeam> {
                t
            };
            List <MainTeam> actual = _repo.GetAllMainTeams();

            Assert.IsTrue(result);
            CollectionAssert.AreEqual(expected, actual);
        }