天天看點

XUnit配置Resharper快捷鍵

resharper是一款很優秀的重構工具,已經習慣了resharper快捷鍵,利用resharper做重構,tdd開發,很爽。唯一缺點就是低配置機器上速度很慢,容易拖死vs,

  為此我我專門把我的本本換成6g記憶體,現在感覺順暢多了。

  關閉所有vs。

  在http://xunitcontrib.codeplex.com/下載下傳xunit.net contrib

  把目錄中的xunitcontrib.runner.resharper.resharper版本号拷貝到c:\program files\jetbrains\resharper\resharper版本号\bin\plugins 下(其中的plugins可能需要手動建立)。同樣你也可以拷貝到<roamingappdata>\jetbrains\resharper\resharper版本号\vs版本号\plugins

  拷貝resharper.external.annotations\xunit.xml到c:\program files\jetbrains\resharper\resharper版本号\bin\externalannotations目錄下。

  開啟vs。

  resharper -> live templates ->"import" 導入xunit-ae.xml或者xunit-xe.xml。xunit-xe.xml和xunit-ae.xml對xunit斷言語句的擴充簡化,xunit-xe.xml以x開頭,比如xe => assert.equal,而xunit-ae.xml則以a開頭,比如ae => assert.equal。

  最後大功告成。

最新内容請見作者的github頁:http://qaseven.github.io/

繼續閱讀