Discover xUnit test with MemberData in Test Explorer
起源是,用MemberData进行封装的Test方法,在Visual Studio 的Test Explorer中只显示为1个。本来,这个显示问题没啥问题,问题是,当你其中一个测试用例出错,而你又想进行Debug的时候,在Test Explorer中运行该方法,实际上会遍历所有的调用,是的Debug过程异常麻烦。
起源是,用MemberData进行封装的Test方法,在Visual Studio 的Test Explorer中只显示为1个。本来,这个显示问题没啥问题,问题是,当你其中一个测试用例出错,而你又想进行Debug的时候,在Test Explorer中运行该方法,实际上会遍历所有的调用,是的Debug过程异常麻烦。
本文基于StackOverflow的以下问题收集整理而成。 What is the fastest waty to count newlines in a large .NET string How to count lines in a string
本文基于Stackoverflows上以下几个Question: Fastest way to remove chars from string More efficient way to remove special characters from string