【问题标题】:MSpec & Resharper test runner issueMSpec & Resharper 测试运行器问题
【发布时间】:2010-08-06 12:54:37
【问题描述】:

我将 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;
    }

但是测试运行器没有运行我的断言但仍然显示成功,我得到的输出是:

【问题讨论】:

    标签: visual-studio-2010 resharper bdd mspec


    【解决方案1】:

    您的问题很可能是由项目目录中的 MSpec 插件 + 程序集的过时版本引起的。请确保您在 ReSharper 插件目录和您的项目中都拥有最新版本的 MSpec from CodeBetter CI

    【讨论】:

    • 谢谢你是对的。我的规范项目引用了 v0.2,它需要 v0.3。
    • 我在最新版本中遇到了完全相同的问题
    • 请确保您项目的 MSpec 程序集与 ReSharper 插件目录中的程序集匹配。
    猜你喜欢
    • 2011-04-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-20
    • 1970-01-01
    • 1970-01-01
    • 2010-12-01
    • 1970-01-01
    相关资源
    最近更新 更多