9
Test Driven Development in the .Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Embed Size (px)

Citation preview

Page 1: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Test Driven Development in the .Net Framework

Sam LeeMayur MehtaJaymeen Shah

McCoy College of Business Administration

Texas State University-San Marcos

Page 2: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Outline

Test Driven Development Unit Testing & Visual Studio .Net 2008

Nunit ADO.Net Entity Framework

Conclusion

Page 3: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Test Driven Development (TDD)

Packaged software A powerful global industry Intense time-to-market pressures The need to always adapt software in

progress to new functionality TDD: unit test cases are written for

the implementation of any new functionality

Page 4: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

TDD Advantages

Flexibly change the behavior of one part of the system without risking side effects in other parts.

Delivers software in smaller units that are less complex.

Effectively captures requirements such that development tools can be integrated to continue to improve system quality.

Page 5: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

TDD in Visual Studio .Net 2008

Nunit Free and open software A unit-testing framework for all .Net

languages ADO.Net Entity Framework

Facilitate the persistence of data. Abstract the structure of the data into a

more business-friendly manner (based on object-oriented models)

Page 6: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Demo: Nunit

Page 7: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Demo: Entity Framework

Page 8: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Model Driven Architecture (MDA)

The Entity Framework facilitates the construction of a MDA

MDA Models (Conn & Forrester, 2006) Platform independent models (like UML

class diagram) Platform specific models (.Net framework

& code libraries) Transformation models (OR mapping &

XML files)

Page 9: Test Driven Development in the.Net Framework Sam Lee Mayur Mehta Jaymeen Shah McCoy College of Business Administration Texas State University-San Marcos

Conclusion

The classes that access databases can be quickly built and updated using the utilities of ADO.Net Entity Framework.

Develop unit test cases to manage the change of entity models.

Convergence of two development methodologies: TDD and MDA.