public async Task ShouldGetAllTiccketsUserEvent() { List <TicketsToBuyVm> tickets = new List <TicketsToBuyVm>(); tickets.Add(new TicketsToBuyVm { Id = 1 }); await CreateTickets(tickets); TicketService ticketService = new TicketService(_dbContext, _mainEventProvider); TicketController ticketController = new TicketController(ticketService); SetUser(ticketController, _createdUser1.Entity.Id); ActionResult <List <TicketListVm> > result = await ticketController.GetAllTiccketsUserEventAsync(1); List <TicketListVm> returnedTickets = (List <TicketListVm>)((OkObjectResult)result.Result).Value; Assert.AreEqual(2, returnedTickets.Count); Assert.AreEqual("Event 1", returnedTickets[0].MainEventName); Assert.AreEqual(15, returnedTickets[0].Price); Assert.AreEqual("Test ticket type", returnedTickets[0].TicketType); Assert.AreEqual(_createdUser1.Entity.Id, returnedTickets[0].UserId); Assert.AreEqual("Test row name", returnedTickets[0].RowName); Assert.AreEqual("Event 1", returnedTickets[1].MainEventName); Assert.AreEqual(10, returnedTickets[1].Price); Assert.AreEqual("Test ticket type", returnedTickets[1].TicketType); Assert.AreEqual(_createdUser1.Entity.Id, returnedTickets[1].UserId); }