---
title: "Mail-list精选[NMock]NMock2 doesn't support mocking class"
author: "experience"
date: "2006-11-15T21:06:00Z"
tags: []
slug: "mail-list-nmock-nmock2-doesn-t-support-mocking-class"
draft: false
lastmod: "2006-11-15T21:06:00Z"
id: 104906
url: "https://ieagle.iteye.com/blog/104906"
---

NMock2 only support mocking interface but not class. If you try to mock class, you will get an error message:

System.TypeLoadException: Could not load type 'MultiInterface1' from assembly 'Mocks