Exemplo n.º 1
0
        public void AddMemberToTeam()
        {
            // Arrange
            var teams = new List <Team>()
            {
                new Team(), new Team(), new Team()
            };

            _context.Teams.AddRange(teams);
            _context.SaveChanges();
            var players = new List <Player>()
            {
                new Player(), new Player(), new Player()
            };

            // Act
            _target.AddMemberToTeam(teams[1], players);
            // Assert
            Check.That(teams[1].Players).ContainsExactly(players);
            Check.That(_context.Players).ContainsExactly(players);
        }