我将 MSpec 和 Visual Studio 2010 与 Resharper 5.1 一起使用。我已将 MSpec 测试运行器插件安装到 resharper 中,但它无法正常工作。这是我的测试:
public class when_I_click_create_investment_manager : with_main_window
{
Establish I_am_viewing_the_main_page = () => mainWindowViewModel = new MainWindowViewModel();
Because the_user_clicks_create = () => mainWindowViewModel.CreateInvestmentManager.Execute(null);
It should_show_the_investment_manager_details_screen = () => mainWindowViewModel.CurrentWorkspace.ShouldBeOfType(typeof(IInvestmentManagerDetailsViewModel));
It should_set_the_edit_screen_to_create_mode = () => mainWindowViewModel.CurrentWorkspace.Mode.ShouldEqual(WorkspaceMode.New);
}
public class with_main_window
{
protected static IMainWindowViewModel mainWindowViewModel;
}
但是测试运行器没有运行我的断言但仍然显示成功,我得到的输出是: