Join David Gassner for an in-depth discussion in this video Exploring test-driven development with the assert keyword, part of Advanced Java Programming (2012).
In this chapter of the video series I am going to describe some strategies for advanced exception…handling and for testing your code, and I'm going to start in this video with the Assert command.…Assert is a way of testing a condition your code.…For example, let's see you going to pass a value into a method, and you wanted to make…sure that that value matched a certain condition before you passed in.…You could assert that condition, you create the Assert command and then place the condition…after it, and if the Assert is false it'll throw an exception.…
You can't depend on asserts for real functionality in your application, they are only for testing…when you're coding, and that's because asserts can be disabled.…In fact, they only work when you add a certain command line value after the call to the virtual machine.…I'll show you how to use Asserts in this project UsingAsserts, and this code is a version of…a Calculator application that I created in Java Essential Training.…This version of the Calculator looks a little bit different than the older version.…
- Installing Java on Windows and Mac OS X
- Installing Eclipse
- Using new features such as simplified generics
- Working with advanced class structures (member, local inner, etc.)
- Using the Reflection API
- Navigating inheritance trees
- Managing unordered and ordered sets
- Peeking and polling with queues
- Testing and error handling
- Managing files and directories
- Working with I/O streams
- Next steps with Java
Skill Level Advanced
1. Getting Started
2. Java 7 New Features
3. Using Advanced Class Structures
4. Using the Reflection API
5. More of the Collections Framework
6. Testing and Advanced Exception Handling
Using the finally keyword5m 40s
7. Managing Files and Directories in Java 7
8. Working with I/O Streams
9. Working with Multi-threading
- 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.