我一直在使用MSpec编写我的单元测试,并且真的更喜欢BDD风格,我认为它的可读性更高。我现在使用的是MSpec不支持的Silverlight,所以我不得不使用MSTest,但我仍然想保持BDD风格,所以我正在尝试找到一种方法来做到这一点。只是为了解释我想要实现的目标,下面是我将如何编写MSpec测试[Subject(typeof(Calculator))]publicclasswhen_I_add_two_numbers:with_calculator{Establishcontext=()=>this.Calculator=newCalculator();BecauseI_add_
我一直在使用MSpec编写我的单元测试,并且真的更喜欢BDD风格,我认为它的可读性更高。我现在使用的是MSpec不支持的Silverlight,所以我不得不使用MSTest,但我仍然想保持BDD风格,所以我正在尝试找到一种方法来做到这一点。只是为了解释我想要实现的目标,下面是我将如何编写MSpec测试[Subject(typeof(Calculator))]publicclasswhen_I_add_two_numbers:with_calculator{Establishcontext=()=>this.Calculator=newCalculator();BecauseI_add_
我正在编写我的第一个MSpec规范,我需要一些指导。我将规范留在“待定”状态,但上下文已填写。有什么需要改进的地方吗?作为引用,这是故事和第一个场景:Story:"Blogadminlogsintothesystem"AsablogwriterIwanttobeabletologintomyblogSothatIcanwritepostsandadministermyblogScenario:"Logsinfromtheloginpage"GiventheuserentersincorrectcredentialsforauserinthesystemWhentheuserclicks
我正在编写我的第一个MSpec规范,我需要一些指导。我将规范留在“待定”状态,但上下文已填写。有什么需要改进的地方吗?作为引用,这是故事和第一个场景:Story:"Blogadminlogsintothesystem"AsablogwriterIwanttobeabletologintomyblogSothatIcanwritepostsandadministermyblogScenario:"Logsinfromtheloginpage"GiventheuserentersincorrectcredentialsforauserinthesystemWhentheuserclicks