Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Apr 01 2016 16:24
    jeremymeng synchronize #617
  • Apr 01 2016 14:28
    blairconrad commented #490
  • Apr 01 2016 11:07
    blairconrad commented #629
  • Mar 31 2016 14:14
    PascalK starred FakeItEasy/FakeItEasy
  • Mar 31 2016 13:00
    blairconrad commented #490
  • Mar 31 2016 12:48
    drauch commented #490
  • Mar 31 2016 10:57
    blairconrad commented #617
  • Mar 31 2016 10:52
    adamralph commented #617
  • Mar 31 2016 10:42
    blairconrad commented #617
  • Mar 31 2016 10:41
    blairconrad commented #617
  • Mar 31 2016 10:29
    adamralph commented #617
  • Mar 31 2016 09:27
    adamralph commented #637
  • Mar 31 2016 08:29
    cecilphillip commented #637
  • Mar 31 2016 06:27
    M-Zuber commented #637
  • Mar 31 2016 06:25
    thecodejunkie commented #637
  • Mar 31 2016 06:25
    adamralph commented #637
  • Mar 31 2016 06:24
    adamralph commented #637
  • Mar 31 2016 06:13
    adamralph labeled #637
  • Mar 31 2016 06:13
    adamralph labeled #637
  • Mar 31 2016 06:13
    adamralph assigned #637
Blair Conrad
@blairconrad
yup, yup
Thomas Levesque
@thomaslevesque
Ah, no, you're right
Blair Conrad
@blairconrad
Good for us!
Thomas Levesque
@thomaslevesque
we're not using AppendLine
Blair Conrad
@blairconrad
Not this time!

Okay. Customized FluentAssertions it is, not unlike BeAnExceptionOfType.

@LukeMarlin, is this something you're comfortable with/interested in? I'd be happy to work on the change if not, but I realize it's blocking you, so maybe the timing works better if you investigate?
Whatever you prefer.

Sorry folks. Gotta run. Time to clean up and maybe hang some pegboard.
Thomas Levesque
@thomaslevesque
OK, see you later then
Luke Marlin
@LukeMarlin
An extension method on string in FakeItEasy.Tests.TestHelpers.StringAssertionExtensions that would check that string matches ignoring linefeed?
What would be the best way, replacing all /r/n with /n, the check that the resulting strings are equal, or going through them via a loop to avoid "duplicating" the strings?
Blair Conrad
@blairconrad
Oh, I wouldn't worry about duplicating the strings.
Maybe this is short-sighted of me, but I'd consider taking the expected value and replacing \r?\n with System.Environment.NewLine, then comparing.
Or I suppose \r\n|\r|\n with System.Environment.NewLine. Or is this even necessary? I've been out of the Mac game for a while. Bare \rs have gone out of fashion, right?
Ah. Seems we switched over about 19 years ago. Probably no need to worry about it then.
Luke Marlin
@LukeMarlin
Alright, looking at fluentextensions API then. Looks like vscode's intellisense doesn't want to work today so it will be fun
Blair Conrad
@blairconrad
Oh, sorry. I think you want the extensions on StringAssertions. That matches what we did with BeAnExceptionofType.
... and VS is not responding, so I'll be delayed in confirming!
Luke Marlin
@LukeMarlin
Yep I'm already ther$
there
I looked at BeAnExceptionOfType as mentionned
Blair Conrad
@blairconrad
:+1:
Luke Marlin
@LukeMarlin
Seems like you guys have an extension method AsTextBlock on IEnumerable<String> that uses \r\n. Did you aim on using that instead of verbatims at some point?
If yes, it can just be a tweak to that method, and use it everywhere there are verbatim. Might be easier than finding a name to the new FluentAssertion I'm trying to write, what do you think?
It's also possible to replace the 3 occurences of that method by verbatims, whatever you think makes the most sense
Luke Marlin
@LukeMarlin
(Sorry for asking that much questions before contributing, I'm a complete stranger to FakeItEasy, as well as FluentAssertions :) )
Thomas Levesque
@thomaslevesque
I wasn't aware of that method. It must be pretty old.
Blair Conrad
@blairconrad
Great question! Maybe. It looks like the sort of thing I would make up, and it's used in 3 tests, but never spread. Probably we forgot about it immediately after it was made.
I see your point. Join with Environment.NewLine. I'm agnostic. Either approach would be fine with me.
You calling me old?
Thomas Levesque
@thomaslevesque
And it's only used in one class
lol
Blair Conrad
@blairconrad
I'm headed back out to the garage. Will support whatever you guys decide.
And don't be sorry, @LukeMarlin. We welcome questions. I feel a little bad for you that things weren't set up right for you to tackle the issue you care about, but this movement toward supporting builds on Linux is kind of exciting to me.
Luke Marlin
@LukeMarlin
Yeah that would be the point, but @thomaslevesque said he wasn't comfortable with the way I first propose, which is basically the same thing as that method (except that it's reusable of course)
Thomas Levesque
@thomaslevesque

@LukeMarlin sorry if I wasn't clear. What I was uncomfortable with was this:

Alternatively, I suppose we could have the repo adjust its line endings to be native when checked out, but that makes me nervous.

Luke Marlin
@LukeMarlin
Ah, sorry
I understand why this was not comfortable then :D
What would be your take on the three options we've covered:
1) String.WithNormalizedLineEndings, and use normal assertions
2) Some custom fluentAssertion, but I cannot find a name that would be practical and clear (ideas?)
3) Reuse of that old method, with Environment.NewLine instead
Thomas Levesque
@thomaslevesque
I think option 2 is the cleanest
Not sure about the name... You could use the same names as the existing assertions, but with some meaningful prefix, I think
Luke Marlin
@LukeMarlin
The existing being Be, Match, or BeEquivalent, right?
Should().BeEquivalentExpectLineEndings()?
Blair Conrad
@blairconrad
Should().BeModuloLineEndings ?
I took out Equivalent because that already have a meaning in FluentAssertions
And I thought "Modulo" was more precise, although it might be more obscure
SecurIOTy
@SecurIOTy
Hi everyone; is this the place to ask FakeItEasy specific questions?
Blair Conrad
@blairconrad
It's a place. Welcome!
SecurIOTy
@SecurIOTy
Thanks :)