public ActionResult Top() { var cancionService = new CancionService(); var model = cancionService.ObtenerTop(); return(View(model)); }
public ActionResult Index() { var cancionService = new CancionService(); var model = cancionService.ObtenerCanciones(); return(View(model)); }
public async Task Test1Async() { int cancionId = 69; var MoqlibraryRespository = new Mock <IWindAppRepository>(); var cancionEntity = new CacionEntity() { Id = 1, Nombre = "PabloGaspar", Duracio = 5, Votacion = 12, Ventas = 94, Genero = "Masculino" }; MoqlibraryRespository.Setup(m => m.GetCancionAsync(cancionId, false)).Returns(Task.FromResult(cancionEntity)); var myProfile = new WindAppProfile(); var configuration = new MapperConfiguration(cfg => cfg.AddProfile(myProfile)); var mapper = new Mapper(configuration); var cancionService = new CancionService(MoqlibraryRespository.Object, mapper); //act await Assert.ThrowsAsync <NotFoundException>(() => cancionService.ObtenerCancionAsync(1, 69)); }
public CancionController() { CancionService = new CancionService(); }
public UsuariosController(CancionService cancionService) { _cancionService = cancionService; }