Пример #1
0
        public void UpdateTeam(Team team)
        {
            Execute(@"
update  Game
set     Name = @Name
where   TeamId = @teamId",
                team);
        }
Пример #2
0
 public Team Create(TeamDto teamDto)
 {
     var team = new Team();
     team.TeamId = _teamId;
     _teamId++;
     team.Name = teamDto.Name;
     return team;
 }
Пример #3
0
        public void UpdateTeam()
        {
            //arrange
            var teamService = new TeamService(_mockTeamRepository);
            var stubTeam = new Team(){TeamId = 1, Name = "team 1"};

            //act
            teamService.UpdateTeam(stubTeam);

            //assert
            _mockTeamRepository.Received().UpdateTeam(stubTeam);
        }
Пример #4
0
        public void RetrieveTeam()
        {
            //arrange
            var teamService = new TeamService(_mockTeamRepository);
            var stubTeam = new Team(){TeamId = 1, Name = "team 1"};
            _mockTeamRepository.RetrieveTeam(stubTeam.TeamId).Returns(stubTeam);

            //act
            var teamToReturn = teamService.GetTeam(stubTeam.TeamId);
            //assert
            Assert.That(teamToReturn.Name, Is.EqualTo("team 1"));
        }
Пример #5
0
 public void SetTeamDomainFromTeamModel(EditTeamModel editTeamModel, Team team)
 {
     team.TeamId = editTeamModel.Id;
     team.Name = editTeamModel.Name;
 }
Пример #6
0
        public void CreateTeam(Team team)
        {
            Execute(@"
insert into Team
values(@Name)", team);
        }
Пример #7
0
 public void UpdateTeam(Team team)
 {
     _teamRepository.UpdateTeam(team);
 }