Great prezzo Jason. I've had a few cracks at creating tests with entity framework running on a real database, but they have always been so slow to run! I'm impressed how you can achieve the same thing with such speed and readability. Thanks for putting this together mate.
Thank you Jason for this awesome video. It is indeed a very clean approach to testing and after seeing how flawlessly the entire process is I feel very encouraged to try it out myself. Again, thanks for sharing so many great resources with us :) P.S. If you're out of the toilet paper or pasta just shout and we can sort you out ;)
@@JasonTaylorDev you looked pretty healthy in the latest Clean Architecture video from the GOTO 2019 so I think its safe to assume no more food and toilet paper shortages in Australia ;)
Loving yours and Jimmy's work, using a lot of you guys stuff on new project. P.S. you might want to pop configuration into the container in the same way you did IWebHostEnvironment.
I've started a new project following your CA template, it's doing wonders for me! thanks. Would it be too much to ask that you keep doing videos on the subject? You rock!
Hello Jason. Thanks for the great information as always. One question I have is how do you keep the regular and the test db in sync? I see you have one set of migrations. Is there a way to create/update the databases with one set of migration? Also how does this all work in a DevOps pipeline?
Great tutorial, but with some very annoying things: -Running the testproject for the first time on a clean system will give you a break as the default is to break, so I guess the presenter already turned it off. -using the commandline for doing stuff is great for personal stuff, not so great for video's IMHO -using the 'add new file' extention is great, but people need to have it installed as it's not in a clean IDE. Never use extentions in presentations which aren't default installed with a clean Visual Studio in video's unless you also show the installation of the extention. Before I could run the test around 44:00 I had to add "context.Database.EnsureCreated();" to Testing.AddSync before the actual usage of context, otherwise I got an error that the locald user login failed, so I guess the presenter probably already had the database in his localdb (or another reason why it didn't fail for him).
Thanks Jason for this awesome approach at clean testing! My biggest problem though is, to bring my boss to accept EF Core. I have to store huge JSON objects in an MS SQL DB and can't use EF Core. But nonetheless I will try to use as much as you showed in my projects, it's just a little bit more work for me I guess. Any tips on EF Core marketing to convince my boss?
Hello Jason, I am using "Clean architecture". Your blog helped me a lot to implement it. I want to add "log4ner" in "clean architecture" Please help me. Thank you
What are the benefits of putting some methods/functionality in the "using static Testing" class vs the TestBase class? could it not all go into the TestBase?
You could take that approach if preferred. I can't see any reason why it would not. For other styles of testing, you might want to keep TestBase separate, since not all test classes will inherit from the same test base.
Thank you for this awesome video. Is it possible to use mock external service for one test or I have to mock external service globally in OneTimeSetUp method and by input of mock service returns data what I need? Thanks for answer.
You're welcome. 😊 For sure, this could be accomplished by adding behaviour to Testing.cs to update the service collection as necessary. I'd try to avoid this wherever possible. Ideally set up the services as close to production as possible, and limit mocking to the bare minimum. Hopefully, you can test most production scenarios with this approach. Your testing strategy should be holistic, including unit, integration, subcutaneous, and UI tests as necessary. Perhaps the tests you are trying to create belong elsewhere. Happy Coding! 😊
Do any of these videos NOT focus specifically on Web development? I'm looking for a video on this subject, but for actual .exe Applications. The title of this video says that it is a tutorial for Applications. It should really be amended to say it is for Web Applications, because that is the only focus within the video. It's very difficult to find anything for actual WPF/WinForms .exe Applications, because most videos clickbait when they are just solely focussed on Web Technologies.
@@TheHabibass I know, but all these videos focus so heavily on Web Development that it's hard to extrapolate for anything else. I just wish there was something like this for people who don't do web development, and don't need all the extra trappings. My point still stands that if you make a video that focusses ONLY on web development, then your titles and tags should represent that. There's nothing wrong with only caring about Web Development, and only catering for Web Developers... but make them your audience, and don't claim to be marketting to a wider audience, when you're alienating them instead.
Is it wise to manually set up the startup class? You say you had to dig through the source code to figure it out - what about if the source code changes? Everything breaks.
This is in relation to the wiring up of services, specifically the IWebHostEnvironment. If they change the interface in new versions of the framework this will not break anything. It will only be if I decide to upgrade my solution to the new framework that I will need to deal with any breaking changes. That is to be expected and I am happy to deal with the issues when upgrading.