Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Expect.Call(delegate { obj.Method(null); }).IgnoreArguments().Do(
- new Action(() => {Console.Write("executed");throw new Exception(); }));
- try
- {
- int i = 0;
- TestClass mock = MockRepository.GenerateMock<TestClass>();
- mock.Expect(x => x.Method()).Do(new Action(() => { i++; throw new Exception(); }));
- mock.Method();
- }
- catch
- {
- Console.WriteLine("Bla!");
- }
Add Comment
Please, Sign In to add comment