public void GetById()
        {
            var actual   = cardService.Get(1);
            var expected = DtoConverters.GetCardDto(cards.CardOne);

            Assert.AreEqual(expected, actual);
        }
        public void Save()
        {
            cardService.Save(cards.CardTwo, TestOwner);
            var expected = DtoConverters.GetCardDto(cards.CardTwo);
            var actual   = cardService.Get(7);

            var expectedMethod = "UpdateCards";
            var actualMethod   = InvokedSignalRMethod;

            Assert.AreEqual(expectedMethod, actualMethod);
            Assert.AreEqual(expected, actual);
        }
示例#3
0
 /// <summary>
 /// Возвращает карту по ИД.
 /// </summary>
 /// <param name="id">ИД карты.</param>
 /// <returns>ДТО карты.</returns>
 public CardDto Get(long id)
 {
     return(DtoConverters.GetCardDto(this.repository.Get(id)));
 }