Unit Testing: MOQ Framework

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

КОМЕНТАРІ •

  • @akab211
    @akab211 5 років тому +31

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

  • @2Fast4Mellow
    @2Fast4Mellow 6 років тому +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 UA-cam videos every use UA-cam themselves..

  • @kbinoyn1
    @kbinoyn1 5 років тому +15

    Lazy presentation :P. Manager, Presenter both look sleepy

  • @Uncommon_Senze
    @Uncommon_Senze 4 роки тому +4

    Episode1: ua-cam.com/video/HhRvW1b4IwM/v-deo.html
    Episode2: ua-cam.com/video/a7iGLAvekt4/v-deo.html (previous to the episode above)

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

      Thank you for posting this!

  • @mamyname
    @mamyname 5 років тому +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 6 років тому +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!

  • @PedroSousa-np9wp
    @PedroSousa-np9wp 4 роки тому +1

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

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

    Very good tour

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

    Thanks for this. This is really good.

  • @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;

  • @MrBabumba
    @MrBabumba 6 років тому +2

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

  • @TheSecuror
    @TheSecuror 5 років тому

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

  • @iceniveth
    @iceniveth 6 років тому +1

    Robert looks tired

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

    👏👏👏

  • @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