An example of enterprise threat model
Throughout this book, we will build a secure design for an event ticketing system. Envision a software system that allows a box office or a website to sell tickets to a famous musical concert or theatre event. We will demonstrate unit tests in three languages, PHP, Java, and Python, to test the Person
class from our object model. This chapter will test a single method, but all methods with interesting behavior should have unit tests written. If you remember from our object, the create_login
method takes in a password. We want to ensure the password has a length of eight characters or greater, uses both uppercase and lowercase characters, and has at least one symbol.
Note:
Naming conventions and consistency are important to improve software quality. We are using an example across many programming languages. In some languages, create_login
should be written as createLogin
to maintain language convention. You will see this later in the JUnit...