question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Test GetActualArea fix

See original GitHub issue

Hi,

Currently, the test CanReturnImplementationsOfGenericUnion use default implementation of ToString method for a double. This can cause errors when users have different culture-info settings.

Xunit.Sdk.XunitException
Expected actualArea to be "0.5", but "0,5" differs near ",5" (index 1).
   at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
   at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
   at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
   at FluentAssertions.Execution.AssertionScope.FailWith(String message, Object[] args)
   at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstMismatch()
   at FluentAssertions.Primitives.StringValidator.Validate()
   at FluentAssertions.Primitives.StringAssertions`1.Be(String expected, String because, Object[] becauseArgs)
   at Dunet.Test.GenerateUnionRecord.GenericGenerationTests.CanReturnImplementationsOfGenericUnion(Int32 dividend, Int32 divisor, String expectedOutput) in C:\repos\external-repo\dunet\test\GenerateUnionRecord\GenericGenerationTests.cs:line 104

The suggested fix is to add InvariantCulture parameter.

Note: Creating pull requests is blocked so I present the solution below: image

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
lukaszkrzywiznacommented, Jul 19, 2022

I didn’t know about the option with the forked repo. It works like a charm. Thanks! 😃

0reactions
domn1995commented, Jul 19, 2022

Just merged a fix for this. Let me know if you are unable to submit pull requests with a forked repo and I’ll take another look at the permissions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should We Initialize an Out Parameter Before a Method ...
For a kickoff, let's start with a self-test task. Let me remind you that out parameters must be initialized by the called method...
Read more >
Releases · INRIA/spoon
Bug fixes ; ImportCleaner: Resolve imports of parent types. (PR: #4353) ; Launcher: NPE in Launcher.prettyprint(). (PR: #4303) ; MavenLauncher: Maximum recovery from ......
Read more >
FIX Session Layer Test Cases
This document provides a set of mandatory and optional compliance tests applicable to all versions of the FIX session layer standard.
Read more >
org.eclipse.equinox.internal.p2.metadata.repository. ...
Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence. Arrays (java.util). This class contains various...
Read more >
Metal perimeter to gate area ratio antenna rule
I have tried to write some antenna checks and indeed it seems to work. But one thing I am missing: is there a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found