summaryrefslogtreecommitdiff
path: root/src/specs/Mock.cs
blob: 6712e45a3e54444fc401fd18f2a5c82887a3dc79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System;
using Rhino.Mocks;

namespace specs
{
    public static class Mock
    {
        public static T An<T>() where T : class
        {
            return MockRepository.GenerateMock<T>();
        }

        public static void received<T>(this T mock, Action<T> command)
        {
            mock.AssertWasCalled(command);
        }
    }
}