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 6710401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:01:07+00:00 2026-05-26T08:01:07+00:00

I just started working on a new project with a ton of existing code,

  • 0

I just started working on a new project with a ton of existing code, and the tests are not passing. I’m more of an Nunit guy, so I’m not immediately familiar with the failure points of Xunit.

the problem is in code that sort of looks like this:

fooStringProperty = readSomeFile;
//later
fooStringProperty.ShouldBe(expectedContents)

the above code fails with an error that looks like this:

error : Position: First difference is at position 0
Expected: contentsOfFooStringProperty      
Actual:
contentsOfFooStringProperty

basically, it’s somehow getting this newline in there, and I have no idea how. I have a ton of these failures all over the code base, and it works for other people, so I’m wondering if it’s some xunit version issue?

edit: this is totally a CRLF issue between mac and windows. problem resolved 🙂

  • 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-26T08:01:08+00:00Added an answer on May 26, 2026 at 8:01 am

    It seems unlikely that xUnit is injecting newlines. It seems more likely that you really have got rogue newlines, for some completely other reason.

    I would suggest that you diagnose this by debugging through the code and checking the values in the debugger. Set a breakpoint on the assertion line, and see whether it looks right to you. Assuming it really is broken at that point, put a breakpoint where you’re fetching/reading/computing each value. Basically apply the normal steps to working out unexpected behaviour – ignore the xUnit aspect.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just started working on a new project and I can't set the build
I just started working on a new project that already contains a .svn folder
Just started working on a c project. Need help with passing function pointers/macro functions/etc.
I have just started working with a new Coldfusion project, well the project is
I just started working on a new Eclipse Android project and want to make
I'm an emacs user who just started working for a new company where eclipse
I just started working on my first Visual Studio project, and I imported all
I am new to Django and have started working on a mature Django project.
I just started working on a project that uses git as a repository. I've
I am new to ASP and ASP.net. I have just started working on a

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.