public void TestShouldGetTransfers() { // Given var controller = CreateController(SampleBookTransferDaos.CreateBookTransferDaos()); // When var result = controller.GetTransfers(); // Then var r = (OkObjectResult)result; var dto = (IEnumerable <BookTransferDto>)r.Value; Assert.AreEqual(200, r.StatusCode); Assert.AreEqual("CH56 0483 5012 3456 7800 9", dto.Single().Iban); }
public void TestShouldGetTransferFromId() { // Given var controller = CreateController(SampleBookTransferDaos.CreateBookTransferDaos()); // When var result = controller.GetTransferFromId(33); // Then var r = (OkObjectResult)result; var dto = (BookTransferDto)r.Value; Assert.AreEqual(200, r.StatusCode); Assert.AreEqual(33, dto.Id); }