bchavez / Bogus

:card_index: A simple fake data generator for C#, F#, and VB.NET. Based on and ported from the famed faker.js.
Other
8.51k stars 483 forks source link

Faker.Tv() is missing from Bogus.Hollywood #505

Closed Mathiasw closed 9 months ago

Mathiasw commented 9 months ago

Version Information

Software Version(s)
Bogus NuGet Package 34.0.2
.NET Core? 6.0
.NET Full Framework?
Windows OS? Nope !
Linux OS? Nope!
Mac OS? Sonama 14.0
Visual Studio? Rider 2023.3.2

What locale are you using with Bogus?

Default english - en-US I guess?

What is the expected behavior?

Faker.Tv() is not in the library. I think it's missing (I have a premium licence).

What is the actual behavior?

This compiles:

    var movieReviews = Enumerable.Range(0, 10)
        .Select(_ => $"{f.Movies().MovieTitle()} is terrible, {f.Movies().ActorName()} was awful in it. {f.Movies().Production()} should be ashamed")
        .ToList();

I can't compile this:

    var tvReviews = Enumerable.Range(0, 10)
        .Select(_ => $"I have just finished watching {f.Tv().Series()}, {f.Tv().ActorName()} was awful in it. {f.Tv().Production()} should be ashamed")
        .ToList();

Please provide a stack trace.

Didn't compile.

Any possible solutions?

Nope. I have Bogus, Bogus.text and Bogus.Hollywood installed. Movies() works fine, Tv() can't be found.

How do you reproduce the issue?

Do you have a unit test that can demonstrate the bug?

Can you identify the location in Bogus' source code where the problem exists?

Sorry, no. I had a look but to no avail.

If the bug is confirmed, would you be willing to submit a PR?

Yes or No?

yes.

bchavez commented 9 months ago

Ah yeah, looks like I forgot an extension method to create the TV dataset; I'll try to get a fix out today. Thank you for the bug report.

image

bchavez commented 9 months ago

Hello, the Bogus.Hollywood should be fixed now; v9 premium packages released:

image

image

Please let me know if that fixes the problem.

Thanks again for your OSS support.

-Brian

Mathiasw commented 9 months ago

Works great now, thanks for the quick fix, especially at the weekend. Now please go out and party a bit instead of writing code at the weekend!