fakeiteasy
Faking/mocking an interface gives "no default constructor" error, how can that be?
I\'m trying to write a unit test of a repository implementation. The repository uses RavenDB as a database. For the unit tests, I would like to mock the RavenDB parts. In order to create the mocks (fa[详细]
2023-04-09 01:58 分类:问答Using Expression Trees as an argument constraint
Can I use an Expression Tree as an argument constraint in a FakeIteasy CallTo assertion? Given a method on an interface with the following signature:[详细]
2023-04-08 13:46 分类:问答How do I assert that a method is called only once?
[Subject(typeof(OnceADayProcessor))] public class When_processing_process_twice { private static ICanBeProcessedOnceADay ProcessedOnceADay;[详细]
2023-04-04 01:59 分类:问答Difference in Behavior between Rhino and FakeItEasy
We\'re considering switching from Rhino to FakeItEasy for our mocking framework. The main reason is simplicity, in FakeItEasy there\'s only one way to do things. Rhino has record/playback, AAA, stub,[详细]
2023-03-30 16:39 分类:问答Unit testing with FakeItEasy against nested Entity Framework member
We are trying to unit test code that relies on the Entity Framework 4.1.I\'ve seen several posts that implement unit testing against POCOs, but we would like to retain the default EF plumbing, so that[详细]
2023-03-27 19:22 分类:问答Asserting a call to a public method on the same mock instance
I have the following test [Test] public void Attack_TargetWith3Damage_CausesAttackerToDeal3DamageToTarget()[详细]
2023-03-27 19:14 分类:问答Is there any way to create a fake from a System.Type object in FakeItEasy?
Is there any way to create a fake from a System.Type object in FakeItEasy? Similar to: var instance = A.Fake(type);[详细]
2023-03-18 04:17 分类:问答How to mock class members in C#?
I\'m trying to use FakeItEasy to mock an object that is a member of a C# class I\'m creating. The FakeItEasy documentation indicates that you fake an object in a way similar to this:[详细]
2023-03-05 00:04 分类:问答Raising events with FakeItEasy in VB.Net to verify that event handler is wired properly
I am attempting to test that the event handlers between an interface and controller are wired properly.The system is set up like the example below:[详细]
2023-03-01 07:36 分类:问答Fake Captcha from commonlibnet with FakeItEasy and FluentValidation
I am using the Captcha class from commonlibrary (http://commonlibrarynet.codeplex.com/). My code works and everything but now I\'m trying to write the unit test.[详细]
2023-02-28 01:04 分类:问答