public static void IsNullOrEmpty_Null() { // Arrange IPagedList <int> list = null; // Act var result = PagedListHelper.IsNullOrEmpty(list); // Assert Assert.Null(list); Assert.True(result); }
public static void IsNullOrEmpty_NotEmpty() { // Arrange var mockList = new Mock <IPagedList <int> >(); mockList.SetupGet(list => list.State.HasItems).Returns(true); // Act var result = PagedListHelper.IsNullOrEmpty(mockList.Object); // Assert Assert.False(result); }
public static bool IsNullOrEmpty <T>(this IPagedList <T> pagedList) { return(PagedListHelper.IsNullOrEmpty(pagedList)); }