Join Reynald Adolphe for an in-depth discussion in this video Unit testing static classes, part of C# Best Practices for Developers.
- So, we are ready to test our notification service.…So, to do so,…let's create our test project for this purpose.…Right-click on Test, New Project,…and we'll make sure to reselect Test on the left-hand side,…and we'll call this Prestige.CommonTests.…Okay, double check that it's right in the Test folder,…and it seems that it is.…
Let's rename this UniTest to NotificationServiceTest.…Should I update my class name?…Yes.…Now, let me go ahead and save this, Ctrl-S,…and before we move any further,…we want to be able to set a reference to the project…that we're going to be using.…
That is Prestige.Common.…And now, we can create our TestMethod.…TestNotifyTalent.…And when we are arranging,…we'll expect, and let me go ahead and take a look…to see what we wrote, talent, colon, space,…and then the talent name.…
Now, to make this a little bit more specific…to what we're actually doing,…it really should say something like Notifying talent,…and then it'll have this talent name.…So, I'll save that, and then over here…is also what I'm going to want to display in our test.…
- Naming and handling classes
- Running a unit test
- Using constructors
- Naming and handling methods, fields, and properties
- Using properties correctly
- Managing objects efficiently
- Common design patterns as best practices
Skill Level Intermediate
1. Best Practices: An Overview
2. Naming and Handling Classes
3. Naming and Handling Methods, Fields, and Properties
4. Managing Objects Efficiently
5. More Best Practices Resources
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.