我正在使用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;
}
但是测试运行器没有运行我的断言,但仍然显示成功,我得到的输出是:
答案 0 :(得分:3)
您的问题很可能是由项目目录中MSpec插件+程序集的过时构建引起的。请确保您在ReSharper插件目录和项目中都拥有MSpec from CodeBetter CI的最新版本。