public void GetTransfer_ShouldNotFindTransfer() { var controller = new SwiftTransfersControllerTest(GetTestTransfers()); var result = controller.GetTransfer(999); Assert.IsInstanceOfType(result, typeof(NotFoundResult)); }
public void GetTransfersFind_ShouldFindTransfers() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = controller.Search("3001", testTransfers); Assert.AreEqual(testTransfers[2].holder, result[0].holder); }
public void GetAllTransfers_ShouldReturnAllTransfers() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = controller.GetAllTransfers() as List <SwiftTransfer>; Assert.AreEqual(testTransfers.Count, result.Count); }
public async Task GetAllTransfersAsync_ShouldReturnAllTransfers() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = await controller.GetAllTransfersAsync() as List <SwiftTransfer>; Assert.AreEqual(testTransfers.Count, result.Count); }
public async Task GetTransferPaginatedAsync_ShouldPaginateTransfer() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = await controller.GetAllTransfersPaginateAsync(1, 4, testTransfers) as List <SwiftTransfer>; Assert.AreEqual(testTransfers[4].holder, result[0].holder); }
public void GetTransferPaginated_ShouldPaginateTransfer() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = controller.Paginate(1, 4, testTransfers); Assert.AreEqual(testTransfers[4].holder, result[0].holder); }
public async Task GetTransferSortedAsync_ShouldSortTransfer() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = await controller.GetAllTransfersSortAsync("-id", testTransfers) as List <SwiftTransfer>; Assert.AreEqual(testTransfers[3].holder, result[1].holder); }
public void GetTransferSorted_ShouldSortTransfer() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = controller.Sort("-id", testTransfers); Assert.AreEqual(testTransfers[3].holder, result[1].holder); }
public async Task GetTransfersFindAsync_ShouldFindTransfers() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = await controller.GetAllTransfersFindAsync("3001", testTransfers) as List <SwiftTransfer>; Assert.AreEqual(1, result.Count); }
public async Task GetTransferAsync_ShouldReturnCorrectTransfer() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = await controller.GetTransferAsync(930012) as OkNegotiatedContentResult <SwiftTransfer>; Assert.IsNotNull(result); Assert.AreEqual(testTransfers[2].holder, result.Content.holder); }
public void GetTransfer_ShouldReturnCorrectTransfer() { var testTransfers = GetTestTransfers(); var controller = new SwiftTransfersControllerTest(testTransfers); var result = controller.GetTransfer(237912) as OkNegotiatedContentResult <SwiftTransfer>; Assert.IsNotNull(result); Assert.AreEqual(testTransfers[1].holder, result.Content.holder); }