07 2017 档案

摘要:.NET测试--模拟框架NSubstitute.NET测试NSubstitute在GitHub的开源地址:https://github.com/nsubstitute/nsubstitute/downloads 入门现在假设我们有一个基本的计算器界接口:public interface ICalculator { int Add(int a, int b); string Mo... 阅读全文 »
posted @ 2017-07-21 10:22 明明.如月 阅读(1280) 评论(0) 推荐(0) 编辑
摘要:.NET测试断言工具Shouldly.NET测试Shouldly在GitHub的开源地址:https://github.com/shouldly/shouldlyShouldly的官方文档:http://docs.shouldly-lib.net/Shouldly断言框架提供了相等、迭代、动态变量、字符串、字典、任务/异步,以及异常等多方面的支持。 Equality 相等 其中之一Shoul... 阅读全文 »
posted @ 2017-07-14 17:50 明明.如月 阅读(1399) 评论(0) 推荐(0) 编辑
摘要:EF获取数据库表名和列名新建模板小书匠 /// /// 通过当前DBContext上下文获取对应数据库中所有得表 /// /// public List GetTableNames() { var TableNames = new List(); var me... 阅读全文 »
posted @ 2017-07-13 10:33 明明.如月 阅读(3746) 评论(0) 推荐(2) 编辑
摘要:C#测试--内部类测试在被测试的代码库的AssemblyInfo.cs中添加“[assembly: InternalsVisibleTo("UnitTest项目名称")]”。 阅读全文 »
posted @ 2017-07-04 16:30 明明.如月 阅读(473) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示