public void QSortLengthGreatThenZero() { //Arrange var dataMock = new Mock <IDataService>(); dataMock.Setup(repo => repo.GetData()).Returns(new Core.DTO.StorageDTO()); QuickSortController controller = new QuickSortController(dataMock.Object, new QuickSorting(dataMock.Object)); //Act var result = controller.Get(0);//as ObjectResult; //Assert Assert.IsType <ObjectResult>(result); }
public void QSortLengthNotNull() { //Arrange var dataMock = new Mock <IDataService>(); dataMock.Setup(repo => repo.GetData()).Returns(new Core.DTO.StorageDTO() { Values = GetFakeValues() }); QuickSortController controller = new QuickSortController(dataMock.Object, new QuickSorting(dataMock.Object)); //Act var result = controller.Get(11);//as ObjectResult; //Assert Assert.IsType <JsonResult>(result); }