コード例 #1
0
        public void RepoGamerTestsUpdateGamerMT()
        {
            List <Gamer> gamerdb = new List <Gamer>
            {
                new Gamer {
                    GamerID = 0, Active = true
                },
                new Gamer {
                    GamerID = 1, Active = true
                }
            };
            MainTeam t = new MainTeam {
                MainTeamID = 0, TeamName = "stk"
            };

            _gamerSet.Object.AddRange(gamerdb);
            ConnectMocksToDataStore(gamerdb);
            Gamer expected = new Gamer {
                GamerID = 0, Active = false, MainTeam = t
            };
            bool  testcall = _repo.UpdateGamerMainTeam(0, t);
            Gamer actual   = _repo.GetGamerById(0);

            Assert.AreEqual(expected, actual);
            Assert.IsTrue(testcall);
        }