Ejemplo n.º 1
0
        public void GetMockDelegate_DelegateType_IsFuncInt()
        {
            using (var staticMock = new StaticMock(typeof(TargetNamespace.TargetClass)))
            {
                var method = new Func <int>(StaticNamespace.StaticClass.FuncInt).GetMethodInfo();

                var mockDelegate = staticMock.GetMockDelegate(method);

                Assert.That(mockDelegate.DelegateType, Is.EqualTo(typeof(Func <int>)));
            }
        }
Ejemplo n.º 2
0
        public void GetMockDelegate_IsMocked_IsFalse()
        {
            using (var staticMock = new StaticMock(typeof(TargetNamespace.TargetClass)))
            {
                var method = new Func <int>(StaticNamespace.StaticClass.FuncInt).GetMethodInfo();

                var mockDelegate = staticMock.GetMockDelegate(method);

                Assert.That(mockDelegate.IsMocked, Is.False);
            }
        }