Generating realistic fake data in .NET using Bogus

Поділитися
Вставка
  • Опубліковано 15 гру 2024

КОМЕНТАРІ • 32

  • @zoltan.halasz
    @zoltan.halasz 4 роки тому +5

    I like your channel and topics for .net. this is also an interesting one!

  • @vamsi8669
    @vamsi8669 4 роки тому +3

    Your videos and content is invaluable. Thanks

  • @williambell4591
    @williambell4591 4 роки тому

    Thanks for this - very apropos for me! Never heard of this package until now! Thanks!

  • @ceralguy85
    @ceralguy85 4 роки тому +3

    Great video, this would help me to test simple apis on net core.

  • @ronaldoperes1202
    @ronaldoperes1202 2 роки тому +1

    What about Autofixture?

  • @viliuxsas
    @viliuxsas Рік тому

    How to quickly populate in Visual Studio 2022 like 5:50 ?

  • @cavalfou
    @cavalfou 2 роки тому

    Hey, is there a way to have coherent address like not having an American Lake in the Country Reunion for example?

  • @yeisonbernal1219
    @yeisonbernal1219 4 роки тому +1

    Thanks for the video! really useful, i have a question, i am generating countrys whith name and CountryCode ISO 33166. All the 245 that exist, but as it is randomly generated, repeted countrys apear. how can i avoid repeted country names and country codes using The faker (Address.Country and Address.CountryCode) ?

  • @ahmeddan7734
    @ahmeddan7734 4 роки тому +1

    Thanks. Great one

  • @recepdmr_
    @recepdmr_ 4 роки тому +1

    Thanks for video.

  • @cloudsty452
    @cloudsty452 4 роки тому

    What's the comparison between Bogus and GenFu. GenFu pretty much does the same

  • @PaulNicholsAUS
    @PaulNicholsAUS 3 роки тому +2

    Hi Nick I haven’t watched the video yet but do you know how this compares with Autofixture which I use?

    • @nickchapsas
      @nickchapsas  3 роки тому +1

      If you want realistic looking data then it’s better

    • @kj2w
      @kj2w 3 роки тому +3

      Bogus, to me, is used for generating real looking data that I need to read. Something I would use to seed my Local/QA/Test database(es) and then display in a UI.
      AutoFixture I've used in unit tests where I wanted complex objects but don't necessarily need properties to be readable.
      Example, for property Firstname, Bogus would create a string of "Sally", "Kevin" or "Nick". Whereas AutoFixture would create a string of "Firstname_9b003ae7-f6e6-45c8-836a-e8d1c4d6c403', 'Firstname_3f739a19-8b61-4214-b628-2cae4cb6f31d', or 'Firstname_dea11d42-9cff-44b3-94e2-5192c09eb110'.
      My unit test for Firstname just cares that its a string, not necessarily the contents of the property.

  • @romanhrytskiv8845
    @romanhrytskiv8845 4 роки тому +1

    Nice one, thanks!

  • @mohammedhayder3776
    @mohammedhayder3776 4 роки тому

    can you please talk about background services in dotnet core?

  • @standman007
    @standman007 4 роки тому +1

    Thank you Thank you!!

  • @justwatching6118
    @justwatching6118 2 роки тому

    Interesting, thank you! :)

  • @jerryjeremy4038
    @jerryjeremy4038 4 роки тому +1

    Good share. Thanks

  • @terencetcf
    @terencetcf 3 роки тому

    I wonder if you can use it to fake 2 objects that are related. For example, you have entity & dto class and you want to fake both with same data, then I can test a mapper logic to make sure the return dto has the correct mappings.

    • @izobrr
      @izobrr 3 роки тому

      In this case you need to populate one object, then map it manually to the other object and compare this with what your mapper returns. Or, maybe you want to test your mapper, but there is other way to map these objects which you can trust. For example serialize one object to json and deserialize as another object. Then again you populate one object and compare your mapper with this method.

    • @terencetcf
      @terencetcf 3 роки тому

      @@izobrr what I meant is using the faker instead of doing it manually. Almost: var objectToMap = new faker(); var mappedDto = mapper(objectToMap); var expected = new faker(); mappedDto.shouldBeEquivalentTo(expected);

  • @aliwa91
    @aliwa91 4 роки тому +1

    think you

  • @MarkMorganLancaster
    @MarkMorganLancaster 2 роки тому

    Bravo Poly😀

  • @brentsteyn6671
    @brentsteyn6671 3 роки тому

    It would be cool if it could generate the values automatically. Maybe I should write something like that 🤔

  • @steveidowu906
    @steveidowu906 4 роки тому

    This is cool!

  • @msayeed78
    @msayeed78 4 роки тому

    Super!

  • @MaxLaurieHutchinson
    @MaxLaurieHutchinson 2 роки тому

    I love bogus!