public void DataGridViewService_Updates_MetaData() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { rowsPerPage = 25 }; service.ApplyMetaData(GenerateList(), ref metaData).ToList(); metaData.totalRows.Should().Be(137); }
public void DataGridViewService_Pages_Correctly_First_Page() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { rowsPerPage = 25 }; var result = service.ApplyMetaData(GenerateList(), ref metaData).ToList(); result.Should().HaveCount(25); }
public void DataGridViewService_Sorts_By_Id_For_Missing_SortOrder() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { rowsPerPage = 25 }; var result = service.ApplyMetaData(GenerateList(), ref metaData).ToList(); result.Select(i => i.Id).Should().BeInAscendingOrder(); }
public void DataGridViewService_Sorts_By_Id_For_Invalid_Property() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { sortColumn = "Wrong", rowsPerPage = 25 }; var result = service.ApplyMetaData(GenerateList(), ref metaData).ToList(); result.Select(i => i.Id).Should().BeInAscendingOrder(); }
public void DataGridViewService_Sorts_Correctly() { var service = new DataGridViewService(); var metaData = new DataGridViewMetaData() { sortColumn = "Name", rowsPerPage = 25 }; var result = service.ApplyMetaData(GenerateList(), ref metaData).ToList(); result.Select(i => i.Name).Should().BeInAscendingOrder(); }