登录
首页 » C# » 单元测试的艺术(第2版)随书示例源码

单元测试的艺术(第2版)随书示例源码

于 2019-02-22 发布
0 317
下载积分: 1 下载次数: 0

代码说明:

所有程序员都知道应该做单元测试,但为什么你们没有做呢?是因为对单元测试不够了解,还是嫌单元测试麻烦,抑或认为单元测试的投入产出比太低?不管因为什么,你都应该看看这本书。本书在第1版基础上新增了很多内容,不过仍然会手把手地教你从第一个单元测试开始写起,通过简单的例子让你理解如何编写好维护、易明白和可靠的单元测试。在此基础上,本书自然过渡到一些较为高级的主题,比如模拟对象、存根和隔离框架(Moq、FakeItEasy和Typemock Isolator等),同时涉及测试模式,以及组织、重构代码的技巧,乃至怎么测试“不可测试”的代码。另外,其中还介绍了集成测试和关联数据库的测试技术。本书代码示例虽然是用C#写的,但有关单元测试的技术和思想适合所有使用静态类型语言(如VB.NET、Java、C )的测试人员,以及测试驱动开发人员学习借鉴

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • javascript 调用wcf示例源码下载
    javascript 调用wcf示例源码下载
    2014-06-07下载
    积分:1
  • WPF折叠菜单、文字分割(自定义左侧导航菜单)
    WPF折叠菜单、文字分割(自定义左侧导航菜单)
    2018-05-02下载
    积分:1
  • C# 开发海康(实时预览示例)
    C# 开发海康(实时预览示例)
    2021-05-06下载
    积分:1
  • C# 农历 操作常用类 源码
    C# 农历 操作常用类 源码
    2014-06-11下载
    积分:1
  • C# 套打Demo
    套打Demo 【核心代码】using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Drawing.Printing;namespace Print_Demo{ public partial class Form1 : Form { public PrintDocument printDt = new PrintDocument(); //打印文档对象 Font printFont; //打印使用的字体 public Form1() { InitializeComponent(); } void printDt_PrintPage(object sender, PrintPageEventArgs e) { float pointX = 10; float pointY = 10; e.Graphics.DrawString("打印内容", new Font("宋体", 16F), Brushes.Black, pointX 60, pointY); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 26,pointX 300,pointY 26); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 35); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 56, pointX 300, pointY 56); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 65); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 86, pointX 300, pointY 86); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 95); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 116, pointX 300, pointY 116); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 125); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 146, pointX 300, pointY 146); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 155); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 176, pointX 300, pointY 176); e.Graphics.DrawString("打印内容", printFont, Brushes.Black, pointX, pointY 185); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 206, pointX 300, pointY 206); e.Graphics.DrawString("检测结果", printFont, Brushes.Black, pointX, pointY 233); e.Graphics.DrawString("通过", new Font("宋体",22F,FontStyle.Bold), Brushes.Black, pointX 90, pointY 225); e.Graphics.DrawLine(new Pen(Color.Black), pointX, pointY 265, pointX 300, pointY 265); e.Graphics.DrawString("单位名称", printFont, Brushes.Black, pointX, pointY 275); } private void Form1_Load(object sender, EventArgs e) { printDt.PrintPage = new PrintPageEventHandler(printDt_PrintPage); printFont = new Font("宋体", 12F); } private void btnPrint_Click(object sender, EventArgs e) { //PrintDialog printDlg = new PrintDialog(); //printDlg.Document = printDt; //printDlg.AllowPrintToFile = true; //printDlg.AllowCurrentPage = true; //printDlg.AllowSelection = true; //printDlg.ShowDialog(); //printDlg.ShowDialog(); printDt.Print(); } private void btnLook_Click(object sender, EventArgs e) { PrintPreviewDialog printPreview = new PrintPreviewDialog(); printPreview.PrintPreviewControl.Document = printDt; printPreview.ShowDialog(this); } }}
    2021-05-06下载
    积分:1
  • MVC输出前对html修改例子
    原理:ActionFilterAttribute
    2014-10-16下载
    积分:1
  • c++知识点总结.doc
    c++知识点总结.doc
    2021-05-06下载
    积分:1
  • Winfrom控件教程
    Winfrom基础控件教程
    2014-03-18下载
    积分:1
  • c# 通过winform打开控制台 并读取相关数据 例子
    winform与控制台通讯例子
    2015-06-16下载
    积分:1
  • 窗体的浮动及隐藏--示例源码下载.zip
    窗体的浮动及隐藏--示例源码下载.zip
    2019-08-08下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载