public async Task <ActionResult <CardResponse> > GetCard(long id) { var card = await _cardRepository.Get(id); var cardResponse = MapModelToResponse(card); return(cardResponse); }
public void CanCreateCard() { var cardRepository = new CardRepository(Session); var card = new Card("Testcard", "testType", "testexpansion", CardRarity.Common, "erwin bonnet", "whereever"); cardRepository.Save(card); Session.Evict(card); Session.Clear(); var cardFromRepository = cardRepository.Get(card.Id); Assert.AreEqual("Testcard", cardFromRepository.Name); }