Exemple #1
0
        public MockType BaseType(MockType mockBaseType)
        {
            _baseType = mockBaseType;
            SetupGet(t => t.BaseType).Returns(mockBaseType);
            Setup(t => t.IsSubclassOf(mockBaseType)).Returns(true);

            return(this);
        }
Exemple #2
0
        public MockType AsCollection()
        {
            var mockCollectionType = new MockType();

            mockCollectionType.Setup(t => t.GetInterfaces()).Returns(new Type[] { typeof(IEnumerable <>).MakeGenericType(this) });

            return(mockCollectionType);
        }