Giter Club home page Giter Club logo

faker's People

Contributors

manfredlange avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

faker's Issues

Methods-Locales combinations throwing exceptions

Please find attached a test file which can be integrated (added) to the test solutions and is ready to run, where (nearly) all methods for data generation are called for each supported locale (according to the documentation).

The tests demonstrates where exceptions are happing and unfortunatly there are a lot :-(.
Please don't see this with any anger. I really like and appreciate your effort and the package!

AllLocalizationTests.zip

RimuTec.Faker.Name.LastName() throws an YamlDotNet.Core.YamlException when locale is set to "pl"

Describe the bug
Using RimuTec.Faker.Name.LastName() with locale "pl" throws an exception with the following message:

"(Line: 48, Col: 5, Idx: 29115) - (Line: 48, Col: 9, Idx: 29119): Duplicate key"

To Reproduce

  1. Create a project that targets .NET Framework 4.6.2 or use the test case with name ""
  2. Set Config.Locale = "pl";
  3. Call RimuTec.Faker.Name.LastName();

Expected behavior
A last name will be generated instead of the thrown exception.

Additional context
Add any other context about the problem here.

System.Reflection.TargetInvocationException when calling "RimuTec.Faker.Address.StreetAddress()" with Config.Locale = "ru"

Describe the bug
RimuTec.Faker.Address.StreetAddress() throws an exception when the Locale is set to "ru".

To Reproduce

  1. Create a project that targets .NET Framework 4.6.2 or use the test case with name "StreetAddress_With_Default_Values()"
  2. Reference RimuTec.Faker (via dll / nuget)
  3. Set locale to russian (Config.Locale = "ru";)
  4. Call RimuTec.Faker.Address.StreetAddress();

Expected behavior
A street address would be returned, but an exception is thrown.

Additional context
I made the following changes to get it working at the GeneratorBase.cs file:

Line 83
Changed from
return Fetch(fakerNode[locatorParts[0]], locatorParts.Skip(1).ToArray());
To
return Fetch(fakerNode[locatorParts[0].ToLowerInvariant()], locatorParts.Skip(1).ToArray());

Line 98
Changed from
return Fetch(fakerNode[locatorParts[0]], locatorParts.Skip(1).ToArray());
To
return Fetch(fakerNode[locatorParts[0].ToLowerInvariant()], locatorParts.Skip(1).ToArray());

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.