public void UpdateTeam(Team team) { Execute(@" update Game set Name = @Name where TeamId = @teamId", team); }
public Team Create(TeamDto teamDto) { var team = new Team(); team.TeamId = _teamId; _teamId++; team.Name = teamDto.Name; return team; }
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); }
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")); }
public void SetTeamDomainFromTeamModel(EditTeamModel editTeamModel, Team team) { team.TeamId = editTeamModel.Id; team.Name = editTeamModel.Name; }
public void CreateTeam(Team team) { Execute(@" insert into Team values(@Name)", team); }
public void UpdateTeam(Team team) { _teamRepository.UpdateTeam(team); }