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..
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?
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.
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!
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?
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;
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
This moqing framework is so complex that I might have to test my test code itself...
ha ha ha right
akab211 w
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..
Lazy presentation :P. Manager, Presenter both look sleepy
Episode1: ruclips.net/video/HhRvW1b4IwM/видео.html
Episode2: ruclips.net/video/a7iGLAvekt4/видео.html (previous to the episode above)
Thank you for posting this!
Very good tour
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?
Cause if you change the code, and depending on what you decided to test, it will accuse an error
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.
Both, specially the watcher/manager is very sleepy and makes the whole video seems very sloppy
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!
Thanks for this. This is really good.
This was indeed a lot of drinking from the fire hose.
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?
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;
0:27 "And today... Mock You!"
👏👏👏
a few beers later? :P Interesting topic non the less
Robert looks tired
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