public void AddScore2(string studentId, float score) { Student student = _dataManager.GetByKey(studentId); Student studentUpdated = _scoreUpdaterMock.UpdateScore((Student)student, score); _dataManager.Save(student); }
/* Se puede mejorar el diseño si el ScoreManager sabe guardar * objetos Student * public void AddScore(string studentId, float score) * { * Student student = dataManager.GetByKey(studentId); * dataManager.Save(student); * scoreUpdater.UpdateScore(student, score); * } */ public void AddScore(Student student, float score) { dataManager.Save(student); scoreUpdater.UpdateScore(student, score); }