>Initialization method *********************************************
threw exception. TypeMock.TypeMockException: TypeMock.TypeMockException:
*** No method calls found in recording block. Please check:
* Are you trying to fake a field instead of a property? try to set field
the code is
var fakeFileVersionInfo = Isolate.Fake.Instance<FileVersionInfo>();
Isolate.WhenCalled(() => fakeFileVersionInfo.ProductName).WillReturn("2015.3.0");
Isolate.WhenCalled(() => FileVersionInfo.GetVersionInfo(Assembly.GetExecutingAssembly().Location)).WillReturn(fakeFileVersionInfo);
I used TMock from command line through mstest
If FileVersionInfo is not mockable, is there any workaround?