Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1097227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:24:04+00:00 2026-05-17T00:24:04+00:00

Had a quick look here, couldn’t find a duplicate (correct me if im wrong).

  • 0

Had a quick look here, couldn’t find a duplicate (correct me if im wrong).

I’ve got the following Unit Test for some Paging with LINQ:

    // Arrange.
    const int locationId = 1;
    const LocationType locationType = LocationType.City;
    int pageSize = 10;

    // Act.
    var postsPageOne = PostService.FindAllPostsForLocationPaged<Review>(locationId, locationType, 1, pageSize);
    var postsPageTwo = PostService.FindAllPostsForLocationPaged<Review>(locationId, locationType, 2, pageSize);

    // Assert.
    Assert.IsTrue(postsPageOne.Count > 0);
    Assert.IsTrue(postsPageTwo.Count > 0);
    Assert.AreEqual(postsPageOne.Count, pageSize);
    Assert.AreEqual(postsPageTwo.Count, pageSize);
    CollectionAssert.AllItemsAreNotNull(postsPageOne.ToArray());
    CollectionAssert.AllItemsAreNotNull(postsPageTwo.ToArray());

I want to assert that all items in the collection postsPageOne are different to all the items in the collection postsPageTwo. (seems like the way to test paging)

Any ideas of how I can do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T00:24:05+00:00Added an answer on May 17, 2026 at 12:24 am
    Assert.IsFalse(postsPageOne.Intersect(postsPageTwo).Any());
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've had a quick look through telerik's documentation and a search on here hasn't
Having had a quick look at the Flex docs I can't seem to find
I have had a quick look on Google and didn't pull anything simple up.
I'm very new to greendroid and I had a quick look on its functionalities.
I had a quick look on the forums and I don't think this question
Where can I find the source for Python's list type? I've had a quick
I had a quick question. Is it possible to save a file without actually
I had a quick question about Django URL configuration, and I guess REGEX as
I just had a quick question about git - how backwards compatible are git
I am new to D3 and just had a quick question about tick labels

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.