Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jul 30 05:36
    dennisdoomen opened #1631
  • Jul 27 19:55
    Fed03 closed #1402
  • Jul 27 19:54
    Fed03 commented #1498
  • Jul 26 06:44

    jnyrup on release-6.0

    Fake timing for unstable test o… Merge pull request #1630 from j… (compare)

  • Jul 26 06:44
    jnyrup closed #1630
  • Jul 26 06:27
    jnyrup opened #1630
  • Jul 26 05:27
    dennisdoomen commented #1085
  • Jul 26 02:32
    lonix1 closed #1629
  • Jul 26 02:32
    lonix1 commented #1629
  • Jul 25 19:24
    jnyrup commented #1085
  • Jul 25 18:56
    jnyrup commented #1629
  • Jul 25 18:55
    dennisdoomen commented #1629
  • Jul 25 17:59
    lonix1 opened #1629
  • Jul 25 17:52
    jnyrup commented #1628
  • Jul 25 17:51

    jnyrup on release-6.0

    Avoid double call to concurrent… Fixup some analyzers warnings Merge pull request #1625 from j… (compare)

  • Jul 25 17:51
    jnyrup closed #1625
  • Jul 25 07:55
    dennisdoomen commented #1628
  • Jul 24 18:35
    Ergamon commented #1628
  • Jul 24 12:32
    dennisdoomen commented #1628
  • Jul 24 10:23
    Ergamon opened #1628
Adam Rodger
@adamrodger
[Test]
public void CompareCollections()
{
    var one = new[]
    {
        "ReallyLongString",
        "AnotherReallyLongString",
        "YetAnotherOne",
        "ThisIsGettingPrettyLongNow"
    };
    var two = new[]
    {
        "ButThisOneIsDifferent",
        "SoTheAssertionIsGoingToFail",
        "ButTheOutputIsReallyHardToRead",
        "BecauseItsAllOnOneLine",
        "ButItWouldBeNicerIfItWrapped"
    };

    one.Should().Equal(two);
}
This outputs: Expected collection to be equal to {"ButThisOneIsDifferent", "SoTheAssertionIsGoingToFail", "ButTheOutputIsReallyHardToRead", "BecauseItsAllOnOneLine", "ButItWouldBeNicerIfItWrapped"}, but {"ReallyLongString", "AnotherReallyLongString", "YetAnotherOne", "ThisIsGettingPrettyLongNow"} contains 1 item(s) less. all one one line, which is really hard to read
When you've got a DTO or something with a ToString that can be 100 characters long, and a collection of 15 of those DTOs, it quickly becomes unusable
I've had a look at the source and I've seen that AssertionScope has a UsingLineBreaks option, but my question is, how do I actually access the scope so that I can set that option from a normal test like the one above?
James Webster
@jimmcslim
Trying to compare two lists of dictionaries ( IDictionary<string, object> ), but want to ignore missing keys on (i.e. one dictionary should be a superset of the other, any keys that match should have the same value)
gengxian86
@gengxian86
Hi Guys, I am trying to install Fluent Assertions for Xamarin 4.2.2
but to no avail
Dennis Doomen
@dennisdoomen

Trying to compare two lists of dictionaries ( IDictionary<string, object> ), but want to ignore missing keys on (i.e. one dictionary should be a superset of the other, any keys that match should have the same value)

Nope. There's no API for that yet.

Hi Guys, I am trying to install Fluent Assertions for Xamarin 4.2.2
but to no avail

Did you try https://www.nuget.org/packages/FluentAssertions.Xamarin ?

gengxian86
@gengxian86
@dennisdoomen yup, i tried that but it keep complaining that is couldnt find the required package. are there any dependency for it? im using .net 4.61
Adam Rodger
@adamrodger
@dennisdoomen do you have any ideas on how I can set the UsingLineBreaks option for a given assertion when comparing collection (as in my example above)?
Dennis Doomen
@dennisdoomen
@adamrodger You can't. It is something that is used within the assertion classes
Stuart Blackler
@Im5tu
I've got a bit of free time coming up, thought i'd start to contribute some stuff back. Anything that you want taking a look at as a higher priority?
Dennis Doomen
@dennisdoomen
@Im5tu That would be awesome. There's a lot of stuff up for grabs. I'm still reorganizing the develop branch for v5, but I'll just forward port anything that lands on master
Stuart Blackler
@Im5tu
Do you need a hand with the reorg?
Dennis Doomen
@dennisdoomen
Sure. I'm trying to get my PR to compile properly. Have to go through all the #ifdefs and stuff to make it work. But I've overcommitted a bit too much. See fluentassertions/fluentassertions#558
This is the biggest hurdle before the remainder of the v5 work can commence (see also fluentassertions/fluentassertions#463)
Stuart Blackler
@Im5tu
I'll pull your fork later on and see what I can do :)
Dennis Doomen
@dennisdoomen
:+1:
Stuart Blackler
@Im5tu
I've managed to drop 20 of the error messages. Last ones are quite minor and can be fixed by using the newer type API inside the TypeExtensions.cs class. If you're happy, i'll switch that stuff over tonight and PR back to you :)
Assuming there is no more errors once i've fixed the remaining 13 errors
Dennis Doomen
@dennisdoomen
Man, that would be awesome.
@SaroTasciyan would be happy as well, since he was eagier to help with the remainder of the v5 work
Stuart Blackler
@Im5tu
No worries - i'll get it done so at least the main project is building tonight :)
Dennis Doomen
@dennisdoomen
:+1:
Saro Taşciyan
@SaroTasciyan
:+1: Nice work
Stuart Blackler
@Im5tu
Happy if I pipe the Type calls through to TypeInfo eg:
blob
Dennis Doomen
@dennisdoomen
Sure
Dennis Doomen
@dennisdoomen
That is the NetStandard way
Stuart Blackler
@Im5tu
Here is what i've got it down too:
blob
I'm not sure about the AppDomain stuff. So i'll add a comment and highlight it in the PR for you. The one i'll be stuck on is the top one about GetReferencedAssemblies. But i'll dig now :)
Stuart Blackler
@Im5tu
Main project is now building. Update here: dennisdoomen/fluentassertions#2
Dennis Doomen
@dennisdoomen
If NetStandard doesn't support Assembly, then we can just wrap it in #ifdef NET45
Dennis Doomen
@dennisdoomen
The test framework provider stuff is a bit tricky. It tries to detect which test framework (XUnit, MBUnit, etc) is being used by scanning the assemblies in the AppDomain. Apparently AppDomain is no longer available in NetStandard, so maybe the workaround mentioned here works as well http://www.michael-whelan.net/replacing-appdomain-in-dotnet-core/
The ProbingAdapterResolver is no longer needed. It was used to find by the PCL to find the platform-specific implementation of FA (e.g. NET 4.5, Silverlight, etc)
Dennis Doomen
@dennisdoomen

If NetStandard doesn't support Assembly, then we can just wrap it in #ifdef NET45

Scratch that. NetStandard does support Assembly. But getting the dependencies has to happen through DependencyContext.Default.CompileLibraries
and DependencyContext.Default.RuntimeLibraries. See https://stackoverflow.com/questions/30007264/get-available-types-in-coreclr

Stuart Blackler
@Im5tu
Cool - will alter the PR later :)
Stuart Blackler
@Im5tu
Not given up btw, just adjusting some free time :D
So I removed the unnecessary file, and got to the point of putting in the dependency context, but couldn't seem to find DependencyContext.Default so think i've done something wrong. That's where I am at
Stuart Blackler
@Im5tu
blob
That's what I am getting, any ideas greatly appreciated
Dennis Doomen
@dennisdoomen
Is it possible that it requires a higher version of NetStandard?
Stuart Blackler
@Im5tu
nuget.org says net standard 1.3
(and 1.6 & net451)
Dennis Doomen
@dennisdoomen
According to nuget. org, that 1.1.2 has some weird dependencies on some preview stuff. Try 1.1.1.
Raghav S
@raghav710
I would like to know on how to get a setup ready for the fluentassertions repo. I cloned the master branch and when I run psake.cmd or psake.ps1 I get
Exception: Exec: Er
ror executing command msbuild /v:m /p:Platform="Any CPU" $SlnFile /p:Configurat
ion=Release /p:SourceAnalysisTreatErrorsAsWarnings=false /t:Rebuild $logger.
I am a newbie to this repo, so please excuse any questions that seem obvious
Dennis Doomen
@ddoomen_twitter
The master branch needs Visual Studio 2015. The develop branch is WIP and requires Visual Studio 2017.