using System.Collections.Generic;
using NUnit.Framework;
using Rhino.Mocks;

namespace RhinoMocksGenerics
    /// <summary>
    /// While Rhino Mocks is compatible with the .Net framework 1.1,
    /// it offer several goodies for those who use the 2.0 version of the .Net framework.
    /// Among them are mocking generic interfaces and classes,
    /// and using generic version of the methods in order to reduce casting.
    /// </summary>
    /// <see cref=""/>
    public class RhinoMocksGenericsTest
        public void MockAGenericInterface()
            MockRepository mocks = new MockRepository();
            IList<int> list = mocks.StrictMock<IList();


            Assert.AreEqual(5, list.Count);

        public void MockAGenericInterface_AAA()
            IList<int> list = MockRepository.GenerateStrictMock<IList();
            list.Expect(l => l.Count).Return(5);

            int count = list.Count;

            Assert.AreEqual(5, count);