Test driven development and The value object pattern
来源:互联网 发布:java飞机大战项目总结 编辑:程序博客网 时间:2024/05/17 03:12
Test driven development
With the value object pattern , First we should write a test file , and if use Zend Studio Editer we can generate test file from file | new | PHPUnit Test Case . Then the test file about four operations just like this:
Then based the test code above this is a class about four operations :
Finally , run the test file with click right | run as | PHPUnit Test to check whether there have some bug or not.
The value object pattern
Generally , There are three features in the value object pattern:
- The property should be protected (will be defined with protected of private) , cann't be public;
- The property should be assigned in the construct;
- The property shouldn't be changed in any methods , if you want to chang it , you must build a new object which the property been set to new value.
Frist we still should make a test file :
Then this is the example about the value object pattern based on test file above:
- Test driven development and The value object pattern
- Test-Driven Development and Testing Early
- Test Driven Development and GUI Testing on the Android platform: Temperature Converter sample
- [PDP] - The Value Object Pattern
- .NET Test Driven Development
- .NET Test Driven Development
- Test-Driven Development
- Test Driven Development
- TDD(Test-Driven Development)
- Test-Driven Development
- Test Driven Development
- Test-Driven Development
- Using NMock and DynamicMocks in Test Driven Development
- The Object Primer : Agile Model-Driven Development with UML 2.0
- About TDD(Test Driven Development)
- TDD (Test-Driven Development) Patterns
- Test Driven Development: By Example
- Test Driven Development (TDD)介绍
- 搭建wince开发虚拟环境
- C#调用C语言生成的DLL示例
- java中 像素、英寸、厘米的换算
- 要到二十四了,都还是不熟悉编程语言。
- 数据仓库——3
- Test driven development and The value object pattern
- c语言程序设计入门学习六步曲
- C# lock,Monitor 介绍。(多线程并发控制)
- Matlab GUI设计相关
- 华为专利盘拆解:2.2亿美元与280亿美元
- C#里巧用DateTime预设一些可选的日期范围
- UVA 10048 - Audiophobia
- C#为什么多线程控制winform需要用委托?
- c# 根据当前时间获取,本周,本月,本季度,月初,月末,各个时间段