ncrunch

How do I set up NCrunch to run nspec tests

本秂侑毒 提交于 2019-12-07 03:02:26
问题 I'm struggling to set up NCrunch to run my nspec tests automatically. On the ncrunch forums it says this functionality has not been implemented yet, but then MattFlo says he prefers using NCrunch, so I'm pretty sure it can be made to work. Help would be greatly appreciated! 回答1: We are working on getting NCrunch fully supported. For now you can use the DebuggerShim (it's a cs file included with NSpec) as a shim to run it via NCrunch. The DebuggerShim is pretty much an NUnit test that runs

How do I set up NCrunch to run nspec tests

醉酒当歌 提交于 2019-12-05 09:11:19
I'm struggling to set up NCrunch to run my nspec tests automatically. On the ncrunch forums it says this functionality has not been implemented yet, but then MattFlo says he prefers using NCrunch, so I'm pretty sure it can be made to work. Help would be greatly appreciated! We are working on getting NCrunch fully supported. For now you can use the DebuggerShim (it's a cs file included with NSpec) as a shim to run it via NCrunch. The DebuggerShim is pretty much an NUnit test that runs NSpec tests. You may want to take a look at specwatchr . Matt likes to use NCruch, but I find that it's to

Mocking Generic Method with NSubstitute

此生再无相见时 提交于 2019-12-01 06:35:12
I have an interface with a number of generic methods. These methods perform operations based on the type of data that is passed in. How do I mock this with NSubstitute? At the moment, I had to resort to using a concrete class instead of a mock since I cannot handle all possible types that the method will be called with. public interface IInstanceSource { bool CanCreate<T>(); T Create<T>(); void Register<T>(Func<T> creator); } public static IInstanceSource GetInstanceSource() { var _data = new Dictionary<Type, Func<object>>(); var a = Substitute.For<IInstanceSource>(); //code below fails since

Mocking Generic Method with NSubstitute

折月煮酒 提交于 2019-12-01 03:37:06
问题 I have an interface with a number of generic methods. These methods perform operations based on the type of data that is passed in. How do I mock this with NSubstitute? At the moment, I had to resort to using a concrete class instead of a mock since I cannot handle all possible types that the method will be called with. public interface IInstanceSource { bool CanCreate<T>(); T Create<T>(); void Register<T>(Func<T> creator); } public static IInstanceSource GetInstanceSource() { var _data = new