From the course: Practical Test-Driven Development for Java Programmers
Unlock this course with a free trial
Join today to access over 22,700 courses taught by industry experts.
Finishing the business requirements
From the course: Practical Test-Driven Development for Java Programmers
Finishing the business requirements
- [Instructor] Now I'd like the next thing to do to be to check an invalid 13 digit ISBN. But before we do that I think it's time for a bit of a refactor, and what we've got now are test methods called checkAValidISBN and checkAValid13DigitISBN so I think it makes sense to rename this method to checkAValid10DigitISBN and while we're there are there any others that we should rename? Well yes we've got here checkAnInvalid, let's make that 10DigitISBN. ISBNNumbersEndingInAnXAreValid, I think that should be TenDigitISBNNumbersEndingInAnXAreValid I'm not sure about 13 digit ISBN numbers whether they can end in an X or not just yet and we've got down here nineDigitISBNsAreNotAllowed that's fine, and nonNumericISBNsAreNotAllowed. I think that's okay as well. You might choose to put in here another example of a 13 character string which is non-numeric I'll leave you to do that if you want to. Okay, so let's have a go then at the next test which is going to be for an invalid ISBN number that…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
Testing for exceptions5m 17s
-
(Locked)
Challenge 129s
-
(Locked)
Walkthrough 11m
-
(Locked)
Challenge 22m 25s
-
(Locked)
Walkthrough 2 and challenge 31m 25s
-
(Locked)
Walkthrough 31m 51s
-
(Locked)
Getting to more complex requirements4m 57s
-
(Locked)
Using TDD to safely fix bugs6m 52s
-
(Locked)
Challenge 4 and walkthrough 44m 5s
-
(Locked)
Finishing the business requirements7m 24s
-
-
-
-
-
-
-