Unit Testing: MOQ Framework

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 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 TH-cam videos every use TH-cam themselves..

  • @haskell3702
    @haskell3702 ปีที่แล้ว

    Very good tour

  • @kbinoyn1
    @kbinoyn1 5 ปีที่แล้ว +15

    Lazy presentation :P. Manager, Presenter both look sleepy

  • @PedroSousa-np9wp
    @PedroSousa-np9wp 4 ปีที่แล้ว +1

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

  • @ronsmith6912
    @ronsmith6912 4 ปีที่แล้ว

    Thanks for this. This is really good.

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

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

  • @MrMithgroth
    @MrMithgroth 6 ปีที่แล้ว +2

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

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

  • @phealy02
    @phealy02 4 ปีที่แล้ว +4

    Episode1: th-cam.com/video/HhRvW1b4IwM/w-d-xo.html
    Episode2: th-cam.com/video/a7iGLAvekt4/w-d-xo.html (previous to the episode above)

    • @SteversIO
      @SteversIO 3 ปีที่แล้ว +1

      Thank you for posting this!

  • @haskell3702
    @haskell3702 ปีที่แล้ว

    👏👏👏

  • @TheSecuror
    @TheSecuror 5 ปีที่แล้ว

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

  • @iceniveth
    @iceniveth 6 ปีที่แล้ว +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