1 / 7

TDD Example

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

nibal
Download Presentation

TDD Example

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. TDD Example Test Driven – Koskela Chapter 2

  2. Mail Template Test List • Evaluating template “Hello, ${name}” with the value “Reader” for variable “name” results in the string “Hello, Reader”. • Evaluating template “${greeting}, ${name}” with the values “Hi” and “Reader”, respectively, results in the string “Hello, Reader”. • Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader” • Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError. • Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less. • 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”.

  3. Mail Template Test List • Evaluating template “Hello, ${name}” with the value “Reader” for variable “name” results in the string “Hello, Reader”. • Evaluating template “${greeting}, ${name}” with the values “Hi” and “Reader”, respectively, results in the string “Hello, Reader”. • Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader” • Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError. • Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less. • 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”.

  4. Mail Template Test List • Evaluating template “Hello, ${name}” with the value “Reader” for variable “name” results in the string “Hello, Reader”. • Evaluating template “${greeting}, ${name}” with the values “Hi” and “Reader”, respectively, results in the string “Hello, Reader”. • Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader” • Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError. • Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less. • 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”.

  5. Mail Template Test List • Evaluating template “Hello, ${name}” with the value “Reader” for variable “name” results in the string “Hello, Reader”. • Evaluating template “${greeting}, ${name}” with the values “Hi” and “Reader”, respectively, results in the string “Hello, Reader”. • Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader” • Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError. • Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less. • 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”.

  6. Mail Template Test List • Evaluating template “Hello, ${name}” with the value “Reader” for variable “name” results in the string “Hello, Reader”. • Evaluating template “${greeting}, ${name}” with the values “Hi” and “Reader”, respectively, results in the string “Hello, Reader”. • Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader” • Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError. • Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less. • 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”.

  7. Mail Template Test List • Evaluating template “Hello, ${name}” with the value “Reader” for variable “name” results in the string “Hello, Reader”. • Evaluating template “${greeting}, ${name}” with the values “Hi” and “Reader”, respectively, results in the string “Hello, Reader”. • Evaluating template “Hello, ${name}” with values “Hi” and “Reader” for variables “doesnotexist” and “name”, respectively, results in the string “Hello, Reader” • Evaluating template “Hello, ${name}” with no value for variable “name” raises a MissingValueError. • Verify that a template of 100 words and 20 variables with values of approximately 15 characters each is evaluated in 200 milliseconds or less. • 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”.

More Related