Unit Testing: MOQ Framework

Поделиться
HTML-код
  • Опубликовано: 10 сен 2024

Комментарии • 25

  • @akab211
    @akab211 5 лет назад +31

    This moqing framework is so complex that I might have to test my test code itself...

  • @2Fast4Mellow
    @2Fast4Mellow 5 лет назад +12

    Too bad the previous episodes aren't links! Makes is much harder that it needs to be to view other episodes. Sometimes you start to wonder if people that create RUclips videos every use RUclips themselves..

  • @kbinoyn1
    @kbinoyn1 5 лет назад +15

    Lazy presentation :P. Manager, Presenter both look sleepy

  • @phealy02
    @phealy02 4 года назад +4

    Episode1: ruclips.net/video/HhRvW1b4IwM/видео.html
    Episode2: ruclips.net/video/a7iGLAvekt4/видео.html (previous to the episode above)

    • @SteversIO
      @SteversIO 3 года назад +1

      Thank you for posting this!

  • @haskell3702
    @haskell3702 Год назад

    Very good tour

  • @mamyname
    @mamyname 4 года назад +1

    Here's something I don't really understand with MOQ, If you faking the svc calls, and the data in and data out.. how can you guarantee that the svc or method is working as expected?

    • @rodrigoferraz4058
      @rodrigoferraz4058 4 года назад

      Cause if you change the code, and depending on what you decided to test, it will accuse an error

    • @davidbieber4659
      @davidbieber4659 4 года назад +3

      You wouldn't do that here. You would need a set of integration tests that you run less often (maybe before a production release) that would test the integration of the service with your code. This is called an integration test.

    • @gpzim981
      @gpzim981 3 года назад

      Both, specially the watcher/manager is very sleepy and makes the whole video seems very sloppy

  • @GaryJohnWalker1
    @GaryJohnWalker1 5 лет назад +2

    Just got into using Moq rather than copying and modifying (apis- nearly all the same) this very last week. And have to say it looks worse than it is once you dig in. So, just use it!

  • @ronsmith6912
    @ronsmith6912 4 года назад

    Thanks for this. This is really good.

  • @PedroSousa-np9wp
    @PedroSousa-np9wp 4 года назад +1

    This was indeed a lot of drinking from the fire hose.

  • @StephanMiske
    @StephanMiske 5 лет назад

    You seem to skip over how to test File IO, I thought you mentioned it in the xUnit video. It seam you can only get files in the bin Directory. what about running on build servers?

    • @Qrzychu92
      @Qrzychu92 5 лет назад

      You can put them as Resources in the DLL (Build action "Embedded Resource"), and then load the file with:
      var asm = Assembly.GetExecutingAssembly();
      var resource = string.Format("YourNamespace.{0}", filename);
      using (var stream = asm.GetManifestResourceStream(resource))
      {
      if (stream != null)
      {
      var reader = new StreamReader(stream);
      return reader.ReadToEnd();
      }
      }
      return null;

  • @MrMithgroth
    @MrMithgroth 5 лет назад +2

    0:27 "And today... Mock You!"

  • @haskell3702
    @haskell3702 Год назад

    👏👏👏

  • @TheSecuror
    @TheSecuror 5 лет назад

    a few beers later? :P Interesting topic non the less

  • @iceniveth
    @iceniveth 5 лет назад +1

    Robert looks tired

  • @auchucknorris
    @auchucknorris 2 года назад

    dudes knew it was crashing server and didn't realize getting all customers was an issue lol, and costmers are required to query products?.. sounds like REALLY bad logic or table design lol