If you try to mock
var mock = new Mock<Assembly>();
You will get this error:
The type System.Reflection.Assembly implements ISerializable, but failed to provide a deserialization constructor
Solution
Mock _Assembly interface instead of Assembly class.
var mock = new Mock<_Assembly>();
mock.Setup(w => w.GetTypes()).Throws(new Exception());