博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
C# Note36: .NET unit testing framework
阅读量:6823 次
发布时间:2019-06-26

本文共 1245 字,大约阅读时间需要 4 分钟。

It’s usually good practice to have automated unit tests while developing your code. Doing so helps you find bugs early in the development cycle and saves you time in the long run. These tests can be run by the developer multiple times to verify the behavior of a particular unit of code for different sets of input.
Unit tests essentially check the behavior of a particular unit of the code or the function and are written by the developers who are implementing the functionalities.
We test the behavior of a function before it becomes part of the whole system and goes into production by writing a piece of code to test this behavior under different conditions. Usually, a function gets tested in isolation with the other functions of the system under test (SUT).
In .NET, there are two options to write Unit Tests:
1. Using MS Test2. Using NUnit3. Using XUnit

In the article "", you can learn to start Unit testing of C# classes using NUnit. This article will walk through:

  • Creating the system under test
  • Setting up NUnit
  • Creating the Test project
  • Creating Test classes and methods
  • Different options for running the tests
  • Understanding TestFixtures and TestTearDown
  • Working with Ignore test
 
 
 
 
 

转载于:https://www.cnblogs.com/carsonzhu/p/8601999.html

你可能感兴趣的文章
调用PostgreSQL存储过程,找不到函数名的问题
查看>>
郁闷的一天
查看>>
祖宗十八代的称谓
查看>>
如何配置Hyper-V的虚拟机通过主机网络上网 (NAT)
查看>>
Linux make语法
查看>>
javascript--鼠标拖动
查看>>
[html] 图层div半透明,文字不透明
查看>>
ssh整合问题总结--在添加商品模块实现图片(文件)的上传
查看>>
Service 广播 到Fragment
查看>>
各种HTTP错误消息含义
查看>>
小酌重构系列目录汇总
查看>>
String类常用方法。
查看>>
Codeforces Round #356 (Div. 2) D. Bear and Tower of Cubes dfs
查看>>
【设计模式】状态模式
查看>>
Eclipse文件覆盖问题
查看>>
Android Camera详解
查看>>
绕过校园网WEB认证_dns2tcp实现
查看>>
Cache-Control官方文档
查看>>
【杂文】2017年度总结
查看>>
微服务化的数据库设计与读写分离
查看>>