在R# 8.2.0和VS2013.3中的测试运行器中,我希望按特性分组,就像在VS测试运行器中一样:
问题:我能否让R#显示如下所示的测试结果:
在R#中,我能做到最接近的是这个:
测试代码如下:
R#扩展已安装,用于xUnit:
问题:我能否让R#显示如下所示的测试结果:
![enter image description here](https://istack.dev59.com/SFew5.webp)
![enter image description here](https://istack.dev59.com/6sjtk.webp)
[Trait("Homepage", "User changes sort order to highest rating first")]
public class ChangeSortOrderToRating : IntegrationTestBaseWithData {
readonly JokeViewer viewer;
public ChangeSortOrderToRating() {
viewer = new JokeViewer(new Session());
}
[Fact(DisplayName = "Show all 3 Stories")]
public void ShowAllStories() {
List<Joke> result = viewer.ShowAllJokesHighestRatingFirst();
Assert.Equal(3, result.Count);
}
[Fact(DisplayName = "Show all Stories in rating order")]
public void ShowListOfStoriesInDescendingRankOrder() {
var result = viewer.ShowAllJokesHighestRatingFirst();
// 10,2,5 is order of insert in db
// First should be rating of 2
Assert.Equal(10, result[0].Rating);
Assert.Equal(5, result[1].Rating);
Assert.Equal(2, result[2].Rating);
}
}
R#扩展已安装,用于xUnit:
![enter image description here](https://istack.dev59.com/c96oB.webp)