TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template...

7
TDD Example Test Driven – Koskela Chapter 2

Transcript of TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template...

Page 1: TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template “Hello, ${name}” with the value “Reader” for variable “name”

TDD Example

Test Driven – KoskelaChapter 2

Page 2: TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template “Hello, ${name}” with the value “Reader” for variable “name”

Mail Template Test List1. Evaluating template “Hello, ${name}” with the value “Reader” for variable

“name” results in the string “Hello, Reader”.2. Evaluating template “${greeting}, ${name}” with the values “Hi” and

“Reader”, respectively, results in the string “Hello, Reader”.3. Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for

variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader”

4. Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError.

5. Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less.

6. Evaluate template “${one}, ${two}, ${three}” with values “1”, “${foo}”, and “3”, respectively, and verify that the template engine renders the result as “1, ${foo}, 3”.

Page 3: TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template “Hello, ${name}” with the value “Reader” for variable “name”

Mail Template Test List1. Evaluating template “Hello, ${name}” with the value “Reader” for variable

“name” results in the string “Hello, Reader”.2. Evaluating template “${greeting}, ${name}” with the values “Hi” and

“Reader”, respectively, results in the string “Hello, Reader”.3. Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for

variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader”

4. Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError.

5. Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less.

6. Evaluate template “${one}, ${two}, ${three}” with values “1”, “${foo}”, and “3”, respectively, and verify that the template engine renders the result as “1, ${foo}, 3”.

Page 4: TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template “Hello, ${name}” with the value “Reader” for variable “name”

Mail Template Test List1. Evaluating template “Hello, ${name}” with the value “Reader” for variable

“name” results in the string “Hello, Reader”.2. Evaluating template “${greeting}, ${name}” with the values “Hi” and

“Reader”, respectively, results in the string “Hello, Reader”.3. Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for

variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader”

4. Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError.

5. Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less.

6. Evaluate template “${one}, ${two}, ${three}” with values “1”, “${foo}”, and “3”, respectively, and verify that the template engine renders the result as “1, ${foo}, 3”.

Page 5: TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template “Hello, ${name}” with the value “Reader” for variable “name”

Mail Template Test List1. Evaluating template “Hello, ${name}” with the value “Reader” for variable

“name” results in the string “Hello, Reader”.2. Evaluating template “${greeting}, ${name}” with the values “Hi” and

“Reader”, respectively, results in the string “Hello, Reader”.3. Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for

variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader”

4. Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError.

5. Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less.

6. Evaluate template “${one}, ${two}, ${three}” with values “1”, “${foo}”, and “3”, respectively, and verify that the template engine renders the result as “1, ${foo}, 3”.

Page 6: TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template “Hello, ${name}” with the value “Reader” for variable “name”

Mail Template Test List1. Evaluating template “Hello, ${name}” with the value “Reader” for variable

“name” results in the string “Hello, Reader”.2. Evaluating template “${greeting}, ${name}” with the values “Hi” and

“Reader”, respectively, results in the string “Hello, Reader”.3. Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for

variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader”

4. Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError.

5. Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less.

6. Evaluate template “${one}, ${two}, ${three}” with values “1”, “${foo}”, and “3”, respectively, and verify that the template engine renders the result as “1, ${foo}, 3”.

Page 7: TDD Example Test Driven – Koskela Chapter 2. Mail Template Test List 1.Evaluating template “Hello, ${name}” with the value “Reader” for variable “name”

Mail Template Test List1. Evaluating template “Hello, ${name}” with the value “Reader” for variable

“name” results in the string “Hello, Reader”.2. Evaluating template “${greeting}, ${name}” with the values “Hi” and

“Reader”, respectively, results in the string “Hello, Reader”.3. Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for

variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader”

4. Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError.

5. Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less.

6. Evaluate template “${one}, ${two}, ${three}” with values “1”, “${foo}”, and “3”, respectively, and verify that the template engine renders the result as “1, ${foo}, 3”.