public SongsController(SongGetAllService songGetAllService, SongGetByIdService songGetByIdService, SongAddService songAddService, SongDeleteService songDeleteService, SongUpdateService songUpdateService) { _songGetAllService = songGetAllService; _songGetByIdService = songGetByIdService; _songAddService = songAddService; _songDeleteService = songDeleteService; _songUpdateService = songUpdateService; }
public void AddItemTest() { Song _song = new Song(); _song.SongId = 0; _song.AlbumId = 0; _song.SongTitle = "In The End"; var sRepo = new Mock <ISRepo>(); sRepo.Setup(x => x.Add(_song)).Returns(_song.SongId); var songAddService = new SongAddService(sRepo.Object); Assert.AreEqual(songAddService.AddItem(_song), _song.SongId); }